auth.provider API
    Preparing search index...

    Structured logger interface for @o3co/auth-provider internals.

    Pino-compatible for the call shapes in use here. A pino instance satisfies this interface without an adapter; consumers may inject any object exposing these six methods + child(). Not full pino parity — pino additionally supports Error as the first argument and printf-style interpolation via the trailing ...args (covered by the unknown[] rest below for assignment compatibility, but not interpreted by the default consoleLogger).

    The first argument may be either a structured object or a plain string. When an object is passed, structured fields are propagated by the implementation; the optional second msg becomes the human-readable summary. Object-first is preferred at security-relevant call sites: it makes field-path-based redaction (PII, credentials) tractable, since the keys are directly inspectable rather than embedded inside a format string. The trailing ...args: unknown[] rest preserves source compatibility with legacy string-first call sites that pass an extra error/value as the second argument; the default consoleLogger forwards them verbatim to console.*.

    BREAKING CHANGE (v0.5.1, D-4): the prior interface had only warn(message: string, ...args: unknown[]): void. Implementations conforming to that older shape must now add trace, debug, info, error, fatal, and child. The console-backed default (consoleLogger) satisfies this interface; consumers without a structured logger should rely on it via the optional ComponentMap.logger slot.

    interface Logger {
        child(bindings: Record<string, unknown>): Logger;
        debug(obj: Record<string, unknown>, msg?: string, ...args: unknown[]): void;
        debug(msg: string, ...args: unknown[]): void;
        error(obj: Record<string, unknown>, msg?: string, ...args: unknown[]): void;
        error(msg: string, ...args: unknown[]): void;
        fatal(obj: Record<string, unknown>, msg?: string, ...args: unknown[]): void;
        fatal(msg: string, ...args: unknown[]): void;
        info(obj: Record<string, unknown>, msg?: string, ...args: unknown[]): void;
        info(msg: string, ...args: unknown[]): void;
        trace(obj: Record<string, unknown>, msg?: string, ...args: unknown[]): void;
        trace(msg: string, ...args: unknown[]): void;
        warn(obj: Record<string, unknown>, msg?: string, ...args: unknown[]): void;
        warn(msg: string, ...args: unknown[]): void;
    }
    Index

    Methods

    • Return a child logger that prepends bindings to every subsequent log call. Per-call object fields win over child bindings on key collision (last-write-wins, mirroring pino).

      Parameters

      • bindings: Record<string, unknown>

      Returns Logger