Skip to content

LogAuditSink

Defined in: pipeline-audit/src/sinks/log.sink.ts:33

Zero-dependency AuditSink that writes each record as a JSON line to a logger (the global console by default). The default sink — ideal for local development, tests, or shipping audit logs through your existing log pipeline.

Failures are routed to warn, successes to log, so they are easy to filter.

* new LogAuditSink({ logger: console, pretty: true });

new LogAuditSink(options?): LogAuditSink

Defined in: pipeline-audit/src/sinks/log.sink.ts:37

LogAuditSinkOptions = {}

LogAuditSink

write(record): void

Defined in: pipeline-audit/src/sinks/log.sink.ts:42

Persist / publish a single audit record.

Implementations should be resilient. A throw here is logged by the behavior; with failOpen: false it also fails a successful request. A handler error is always rethrown unchanged.

AuditRecord

The completed audit entry to forward.

void

AuditSink.write