@fjell/logging
Version:
Logging for Fjell
28 lines (27 loc) • 1.22 kB
TypeScript
import * as LogLevel from "./LogLevel";
import * as LogFormat from "./LogFormat";
import { WriterOptions } from "./Writer";
import { FloodControlConfig } from "./FloodControl";
export interface TimeLogger {
end: () => void;
log: (...data: any[]) => void;
}
export interface Logger {
emergency: (message: string, ...data: any[]) => void;
alert: (message: string, ...data: any[]) => void;
critical: (message: string, ...data: any[]) => void;
error: (message: string, ...data: any[]) => void;
warning: (message: string, ...data: any[]) => void;
notice: (message: string, ...data: any[]) => void;
info: (message: string, ...data: any[]) => void;
debug: (message: string, ...data: any[]) => void;
trace: (message: string, ...data: any[]) => void;
default: (message: string, ...data: any[]) => void;
time: (message: string, ...data: any[]) => TimeLogger;
get: (...additionalComponents: string[]) => Logger;
destroy: () => void;
}
export declare const createLogger: (logFormat: LogFormat.Config, logLevel: LogLevel.Config, coordinates: {
category: string;
components: string[];
}, floodControlConfig: FloodControlConfig, writerOptions?: WriterOptions) => Logger;