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).
Optionalmsg: stringOptionalmsg: stringOptionalmsg: stringOptionalmsg: stringOptionalmsg: stringOptionalmsg: string
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
Erroras the first argument and printf-style interpolation via the trailing...args(covered by theunknown[]rest below for assignment compatibility, but not interpreted by the defaultconsoleLogger).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
msgbecomes 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 defaultconsoleLoggerforwards them verbatim toconsole.*.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 addtrace,debug,info,error,fatal, andchild. The console-backed default (consoleLogger) satisfies this interface; consumers without a structured logger should rely on it via the optionalComponentMap.loggerslot.