@foal/core
Version:
Full-featured Node.js framework, with no complexity
30 lines (29 loc) • 896 B
TypeScript
import { Level } from './logger.utils';
export declare class Logger {
private contextStorage;
private errorContextStorage;
private transports;
addTransport(transport: (level: Level, log: string) => void): void;
initLogContext(callback: () => void): void;
addLogContext(context: Record<string, any>): void;
addErrorContext(context: Record<string, any>): void;
log(level: Level, message: string, params?: {
[name: string]: any;
}): void;
debug(message: string, params?: {
error?: Error;
[name: string]: any;
}): void;
info(message: string, params?: {
error?: Error;
[name: string]: any;
}): void;
warn(message: string, params?: {
error?: Error;
[name: string]: any;
}): void;
error(message: string, params?: {
error?: Error;
[name: string]: any;
}): void;
}