@chainsafe/eth2.0-utils
Version:
Utilities required across multiple lodestar packages
38 lines (37 loc) • 1.04 kB
TypeScript
/**
* @module logger
*/
export declare enum LogLevel {
error = 0,
warn = 1,
info = 2,
verbose = 3,
debug = 4,
silly = 5
}
export declare const LogLevels: string[];
export declare const customColors: {
error: string;
warn: string;
info: string;
verbose: string;
debug: string;
silly: string;
};
export declare const defaultLogLevel = LogLevel.info;
export interface ILoggerOptions {
level: typeof LogLevel[number];
module: string;
}
export interface ILogger {
level: LogLevel;
silent: boolean;
error(message: string | object, context?: object): void;
warn(message: string | object, context?: object): void;
info(message: string | object, context?: object): void;
verbose(message: string | object, context?: object): void;
debug(message: string | object, context?: object): void;
silly(message: string | object, context?: object): void;
child(options: ILoggerOptions): ILogger;
important(message: string | object, context?: object): void;
}