Optionalopts: LoggingOptions = {}
logging options
Optionalshared: {internal: shared state for child loggers
Whether the audit destination has failed at least once.
true when healthy
Context fields attached to this logger.
Record a security audit event as an OCSF event. Audit records bypass the operational level filter and are never sampled.
stable event name, e.g. "authorization.denied"
"success", "failure", "allowed", "denied", ...
Optionalfields: Record<string, unknown> = {}
identifiers, policy ids and reason codes only
Optionallevel: AuditLevel = "info"
"info" (default), "warn" or "error"
whether the record was written successfully
Whether execution must be refused because auditing is required (fail-closed) but unavailable.
true when execution must be refused
Create a child logger with additional context fields.
context fields such as requestId
child logger sharing destinations
Flush destinations, e.g. on graceful shutdown.
Record an operational event as an OpenTelemetry log record.
Fields are redacted and bounded, then named by the OpenTelemetry semantic conventions (see toOtelAttributes).
pino level
stable event name, e.g. "server.ready"
Optionalfields: Record<string, unknown> = {}
structured context (never secrets or bodies)
Optionalmessage: string
optional human message (default: the event)
oag-mcp logger facade: a pino logger for operational records and an OCSF writer for security audit records.