export type MainLogLevel = 'debug' | 'info' | 'warn' | 'error'; export interface MainLogFields { [key: string]: unknown; } export interface MainLoggerOptions { directory: string; appId: string; productName: string; version: string; /** Rotates before an append would exceed this size. Default 5 MiB. */ maxBytes?: number; /** Number of rotated files retained in addition to the active file. Default 5. */ maxFiles?: number; /** Also mirror records to stdout/stderr. Default true. */ console?: boolean; } export interface DiagnosticReportOptions { /** Include bounded tails of framework log files. Default true. */ includeLogs?: boolean; /** Maximum bytes read from each log file. Default 256 KiB. */ maxLogBytes?: number; /** App-owned diagnostic state. Secret-looking fields are redacted. */ extra?: MainLogFields; } export interface MainLogger { readonly path: string; debug(message: string, fields?: MainLogFields): void; info(message: string, fields?: MainLogFields): void; warn(message: string, fields?: MainLogFields): void; error(message: string, fields?: MainLogFields): void; flush(): Promise; createDiagnosticReport(options?: DiagnosticReportOptions): Promise; } /** Create the structured, rotating logger attached to every Node Main context. */ export declare function createMainLogger(options: MainLoggerOptions): MainLogger; /** @internal Reused by crash-reports.ts so every capture path bounds strings the same way. */ export declare function boundedString(value: unknown, maxLength?: number): string; /** @internal Reused by crash-reports.ts so crash `extra` fields are redacted the same way as log fields. */ export declare function redactFields(fields: MainLogFields): MainLogFields; //# sourceMappingURL=logger.d.ts.map