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.
Example
Section titled “Example” * new LogAuditSink({ logger: console, pretty: true });Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LogAuditSink(
options?):LogAuditSink
Defined in: pipeline-audit/src/sinks/log.sink.ts:37
Parameters
Section titled “Parameters”options?
Section titled “options?”LogAuditSinkOptions = {}
Returns
Section titled “Returns”LogAuditSink
Methods
Section titled “Methods”write()
Section titled “write()”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.
Parameters
Section titled “Parameters”record
Section titled “record”The completed audit entry to forward.
Returns
Section titled “Returns”void