35 lines
903 B
Python
35 lines
903 B
Python
# #region agent log (debug session 6b638a — status / fila por perfil)
|
|
"""NDJSON append para análise de ambiguidade de status (GG vs origem). Não logar segredos nem PII."""
|
|
import json
|
|
import time
|
|
|
|
LOG_PATH = "/home/f3lipe/dev/docker_services/.cursor/debug-6b638a.log"
|
|
SESSION_ID = "6b638a"
|
|
|
|
|
|
def log_dashboard_row(
|
|
*,
|
|
location: str,
|
|
message: str,
|
|
hypothesis_id: str,
|
|
run_id: str,
|
|
data: dict,
|
|
) -> None:
|
|
try:
|
|
line = {
|
|
"sessionId": SESSION_ID,
|
|
"timestamp": int(time.time() * 1000),
|
|
"runId": run_id,
|
|
"hypothesisId": hypothesis_id,
|
|
"location": location,
|
|
"message": message,
|
|
"data": data,
|
|
}
|
|
with open(LOG_PATH, "a", encoding="utf-8") as f:
|
|
f.write(json.dumps(line, ensure_ascii=False, default=str) + "\n")
|
|
except Exception:
|
|
pass
|
|
|
|
|
|
# #endregion
|