import pino from 'pino'; import { Dict } from '../types'; export interface NodeKitLogger { info(message: string): void; info(extra: Dict | undefined, message: string): void; error(message: string): void; error(extra: Dict | undefined, message: string): void; warn(message: string): void; warn(extra: Dict | undefined, message: string): void; trace(message: string): void; trace(extra: Dict | undefined, message: string): void; debug(message: string): void; debug(extra: Dict | undefined, message: string): void; } export declare class PinoLogger implements NodeKitLogger { private logger; constructor(logger: pino.Logger); info(message: string): void; info(extra: Dict | undefined, message: string): void; warn(message: string): void; warn(extra: Dict | undefined, message: string): void; error(message: string): void; error(extra: Dict | undefined, message: string): void; trace(message: string): void; trace(extra: Dict | undefined, message: string): void; debug(message: string): void; debug(extra: Dict | undefined, message: string): void; } /** * workaround to provide IntelliSense hints https://stackoverflow.com/a/61048124 */ export type LoggingLevel = pino.LevelWithSilent | (string & {}); interface InitLoggerOptions { appName: string; devMode: boolean; destination?: pino.DestinationStream; level?: LoggingLevel; } export declare function initLogger({ appName, devMode, destination, level }: InitLoggerOptions): PinoLogger; export {};