coddyger
Version:
Coddyger est une bibliothèque JavaScript/TypeScript qui fournit des fonctions communes et des plugins pour la gestion des données, la communication entre services, et des utilitaires avancés pour le développement d'applications.
26 lines (25 loc) • 836 B
TypeScript
export declare enum LogLevel {
Info = "info",
Debug = "debug",
Warn = "warn",
Error = "error",
Fatal = "fatal",
Trace = "trace"
}
export declare class LoggerService {
private static instance;
private static logDirectory;
private static getInstance;
static log(payload: {
type: LogLevel;
content: any;
location: string;
method: string;
context?: Record<string, any>;
}): void;
static debug(message: string, context?: Record<string, any>): void;
static info(message: string, context?: Record<string, any>): void;
static warn(message: string, context?: Record<string, any>): void;
static error(message: string | Error, context?: Record<string, any>): void;
static fatal(message: string | Error, context?: Record<string, any>): void;
}