Updated
On this page
Append-only JSONL audit log writer for recording timestamped application events with structured payloads, using thread-safe file writes.
#src.fastware.audit
#src.fastware.audit
Append-only JSONL audit log writer for recording timestamped application events with structured payloads, using thread-safe file writes.
Each entry is a single JSON line with an ISO timestamp, event type, and optional payload dict. Thread-safe via threading.Lock.
#AuditLog
Append-only JSONL audit log.
Parameters
path: Path to the JSONL file. Created on first write if it does not exist.
#log
python
def log(self, event_type: str, payload: dict | None=None) -> NoneAppend a single audit entry as a JSON line.
Each line has the shape::
{"timestamp": "...", "event_type": "...", "payload": {...}}