import type Logger from 'bunyan'; import type { Logger as WpLogger } from '@webpieces/core-util'; /** * BunyanLogger - a webpieces {@link WpLogger} backed by a bunyan logger (one per * name, created as a bunyan child carrying `loggerName`). On every call it reads * the logged HeaderRegistry keys DIRECTLY from the active {@link RequestContext} * (secured values masked) into the bunyan fields object, and normalizes an optional * Error into `err: { name, message, stack }` — matching a production-tested AppLogger. * The GCP stream then serializes those fields into the structured log payload. * * This context-reading is INLINED here (and duplicated in the winston logger) on * purpose: it must run ONLY when a bunyan/winston backend is installed, never for * the plain ConsoleLogger — so it does not belong on RequestContext. */ export declare class BunyanLogger implements WpLogger { private readonly bunyan; constructor(bunyan: Logger); trace(message: string, err?: Error): void; debug(message: string, err?: Error): void; info(message: string, err?: Error): void; warn(message: string, err?: Error): void; error(message: string, err?: Error): void; private buildFields; }