Enable
SetPATTER_LOG_DIR before starting the server:
auto:
- macOS:
~/Library/Application Support/patter - Linux:
$XDG_DATA_HOME/patter(falls back to~/.local/share/patter) - Windows:
%LOCALAPPDATA%/patter
Layout
metadata.json is written atomically (tmp file + rename) so a reader never sees a half-written file. JSONL files are append-only.
Metadata schema
Phone redaction
Caller / callee numbers inmetadata.json are masked by default (last 4 digits). Change via:
transcript.jsonl is not redacted — it can contain customer PII spoken during the call. Gate access to the log root and/or wire up your own redaction pipeline before exporting.
Retention
Old day directories are cleaned up automatically. The sweep runs on ~2% of calls (sampled; no daemon) so a long-running server doesn’t accumulate indefinitely.Reading a call
Safety guarantees
- File-write errors never raise into the call path — a full disk or a permissions hiccup logs a warning and the call continues uninterrupted.
- When
PATTER_LOG_DIRis unset,CallLogger.enabledisfalseand every method returns immediately.
Interop
The on-disk shape is compatible with LiveKit-style session reports and Pipecat observer traces:metadata.json maps 1:1 to a LiveKit SessionReport, and transcript.jsonl rows slot into OpenTelemetry gen_ai.* turn spans. The Python SDK writes the same schema, so a multi-runtime deployment produces a single coherent directory tree.
