This commit is contained in:
lichene 2025-10-23 20:48:02 +02:00
parent 8e9c0593fb
commit 8f56cbd5c8
4 changed files with 6 additions and 8 deletions

View file

@ -90,7 +90,7 @@ def load_logs_binary(service: Optional[str], start: Optional[str], end: Optional
end_dt = pd.to_datetime(end) if end else None
records = []
with open("access.log", "r", errors="ignore") as f:
with open("file.log", "r", errors="ignore") as f:
lines = f.readlines()
start_idx = find_line_index(lines, start_dt, seek_start=True) if start_dt else 0
@ -115,7 +115,6 @@ def load_logs_binary(service: Optional[str], start: Optional[str], end: Optional
continue
records.append({
"timestamp": ts.isoformat(),
"ip": ip,
"path": path,
"lat": lat,
"lon": lon
@ -141,7 +140,7 @@ def get_connections(
# ----------------------------
@app.get("/health")
def health():
size = os.path.getsize("access.log")
size = os.path.getsize("file.log")
return {"status": "ok", "log_size_bytes": size, "cached_ips": len(geo_cache)}
# ----------------------------