18 lines
801 B
TypeScript
18 lines
801 B
TypeScript
|
|
declare class StandardLogger {
|
||
|
|
private defaultContext;
|
||
|
|
private correlationId;
|
||
|
|
constructor();
|
||
|
|
log(level: 'error' | 'warn' | 'info' | 'success' | 'debug', message: string, context?: Record<string, any>): void;
|
||
|
|
error(message: string, context?: Record<string, any>): void;
|
||
|
|
warn(message: string, context?: Record<string, any>): void;
|
||
|
|
info(message: string, context?: Record<string, any>): void;
|
||
|
|
success(message: string, context?: Record<string, any>): void;
|
||
|
|
debug(message: string, context?: Record<string, any>): void;
|
||
|
|
setContext(context: Record<string, any>, overwrite?: boolean): void;
|
||
|
|
setCorrelationId(id?: string | null): string;
|
||
|
|
getCorrelationId(): string | null;
|
||
|
|
clearCorrelationId(): void;
|
||
|
|
}
|
||
|
|
export declare const logger: StandardLogger;
|
||
|
|
export {};
|