@foal/core
Version:
Full-featured Node.js framework, with no complexity
28 lines (27 loc) • 809 B
TypeScript
import { Level } from './logger.utils';
export declare class Logger {
private asyncLocalStorage;
private transports;
addTransport(transport: (level: Level, log: string) => void): void;
initLogContext(callback: () => void): void;
addLogContext(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;
}