Compare commits
No commits in common. "d51f16d33e50f3d4ed9896f804cfd14323ae9b6e" and "bbb08b7789c98f8b47424ec8d7c0104ca17f06ed" have entirely different histories.
d51f16d33e
...
bbb08b7789
1 changed files with 0 additions and 29 deletions
|
|
@ -14,27 +14,6 @@ import uuid
|
|||
from pathlib import Path
|
||||
from typing import Any, Optional
|
||||
|
||||
from obs import get_logger
|
||||
|
||||
# Actions that get promoted to INFO in the operational log. Everything
|
||||
# else logs at DEBUG so the default INFO level shows ~6-8 milestones per
|
||||
# research call instead of 20+ chatty per-step events. Set
|
||||
# MARCHWARDEN_LOG_LEVEL=DEBUG to see all steps.
|
||||
_INFO_ACTIONS = frozenset(
|
||||
{
|
||||
"start",
|
||||
"iteration_start",
|
||||
"synthesis_start",
|
||||
"synthesis_complete",
|
||||
"synthesis_error",
|
||||
"synthesis_build_error",
|
||||
"budget_exhausted",
|
||||
"complete",
|
||||
}
|
||||
)
|
||||
|
||||
_log = get_logger("marchwarden.researcher.trace")
|
||||
|
||||
|
||||
class TraceLogger:
|
||||
"""Logs research steps to a JSONL file.
|
||||
|
|
@ -95,14 +74,6 @@ class TraceLogger:
|
|||
|
||||
self._writer.write(json.dumps(entry, default=str) + "\n")
|
||||
self._writer.flush()
|
||||
|
||||
# Mirror the trace step into the operational logger so admins
|
||||
# can watch progress in real time. trace_id and researcher are
|
||||
# already bound in contextvars by WebResearcher.research, so
|
||||
# they automatically appear on every line.
|
||||
log_method = _log.info if action in _INFO_ACTIONS else _log.debug
|
||||
log_method(action, step=self._step_counter, decision=decision, **kwargs)
|
||||
|
||||
return entry
|
||||
|
||||
def read_entries(self) -> list[dict]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue