Expand description
JSONL append-only writer + rolling rotation.
RAM contract: a single event lands in two allocations (the JSON line
that goes to disk + the serde_json::Value clone that goes to the
broadcast hook). Rolling rotation streams through BufReader::lines
into a temp file rather than slurping the whole file into a String.
Functions§
- init_
from_ config - Initialize (or disable) the persistence writer from config. Idempotent. When enabled, runs a streaming in-place migration of any schema-1 rows in the existing file before resuming appends.
- record_
event - Emit one event. Always fans out to the broadcast hook + tracing event. If persistence is enabled, also appends a JSON line to disk.
- runtime_
trace_ path - Public accessor for the canonical log file path. Used by the gateway’s
/api/logsendpoint to know which file to stream.