Clear all audit entries (for testing or rotation)
Record an auditable event. Thread-safe for sequential use; not designed for concurrent writes.
Optionalcontext: Record<string, unknown>Optionalerror: stringReturn all entries as a JSON-encodable array (immutable copy)
Immutable audit logger — produces JSON-streamable audit entries for downstream consumption (files, databases, SIEM systems).