import pino from "pino"; export interface BaseLogObject { code: string; err?: Error; res?: any; req?: any; recoverable?: boolean; } export declare type LogLevel = "debug" | "info" | "warn" | "error" | "silent"; export declare class Logger { private readonly pino; static readonly LEVEL_DEBUG: number; static readonly LEVEL_INFO: number; static readonly LEVEL_WARN: number; static readonly LEVEL_ERROR: number; static readonly LEVEL_SILENT: number; /** * Returns the corresponding numerical value of the log level corresponding to `levelName`. * @param levelName * @throws ArgumentError if an invalid log level name is provided. */ static getLevel(levelName: string): number; private readonly children; private constructor(); static getLogger(name?: string, level?: LogLevel): Logger; debug(obj: T, message: string): void; info(obj: T, message: string): void; warn(obj: T, message: string): void; error(obj: T, message: string): void; /** * Makes a child logger and stores it. See pino's documentation for the specifications of the `bindings` parameter. * If level of the parent is changed these child loggers will also update their level. * @param bindings */ storedChild(bindings: { level?: string; serializers?: { [key: string]: pino.SerializerFn; }; [key: string]: any; }): Logger; /** * Makes a child logger and doesnt store it. See pino's documentation for the specifications of the `bindings` parameter. * If level of the parent is changed these child loggers will not update their level. * @param bindings */ child(bindings: { level?: string; serializers?: { [key: string]: pino.SerializerFn; }; [key: string]: any; }): Logger; private mLevel; get level(): LogLevel; /** * Set the level of this logger and (recursively) all the children of this Logger. */ set level(newLevel: LogLevel); } /** * Sets the logLevel to `logLevel`, unless it's an invalid loglevel; logs an error otherwise. * @param logger the Logger instance * @param logLevel the new logLevel. It must be one of "debug", info", warn", error" or silent" * * Logs an error if logLevel */ export declare function updateLogLevel(logger: Logger, logLevel: string): void; //# sourceMappingURL=logger.d.ts.map