build(agent): new-agents-2#7e3bbc iteration
This commit is contained in:
parent
53d916fb9b
commit
c93be013f3
|
|
@ -8,10 +8,17 @@ class RunLog:
|
|||
def __init__(self, path: str = "deltax_run.log"):
|
||||
self.path = path
|
||||
|
||||
def log(self, entry: dict) -> None:
|
||||
def log(self, entry: dict, venue: str | None = None) -> None:
|
||||
"""Append a log entry deterministically.
|
||||
|
||||
Args:
|
||||
entry: The event payload to log (dict-like).
|
||||
venue: Optional venue identifier for cross-venue tracing.
|
||||
"""
|
||||
with open(self.path, "a", encoding="utf-8") as f:
|
||||
payload = {
|
||||
"ts": time.time(),
|
||||
"venue": venue,
|
||||
"event": entry,
|
||||
}
|
||||
f.write(json.dumps(payload) + "\n")
|
||||
|
|
|
|||
Loading…
Reference in New Issue