UNPKG

slf

Version:
33 lines (32 loc) 1.23 kB
import { Factory, Level, Middleware } from './LoggerFactory'; interface LogFunc { (...value: any[]): void; } declare type LogFunctionKey = Exclude<keyof typeof Logger.prototype, 'log'>; interface LogLevelFunc { /** Log at provided level. */ (level: LogFunctionKey, ...params: any[]): void; /** Log at info level */ (...params: any[]): void; } export declare class Logger { private name; private sink; private chain; private logLevel; constructor(name: string, sink: Factory, chain: Middleware[], logLevel: Level); static getLogger(name?: string): Logger; log: LogLevelFunc; private buildLogEvent; /** Log fine grained informational events that are most useful to debug an application. */ debug: LogFunc; /** Log informational messages that highlight the progress of the application at a coarse grained level. */ info: LogFunc; /** Log potentially harmful situations. */ warn: LogFunc; /** Log error events that might still allow the application to continue running. */ error: LogFunc; /** Log very severe error events that will presumably lead the application to abort- */ critical: LogFunc; } export {};