UNPKG

@tsclean/core

Version:

Plugin for API Rest Full development, based on Clean Architecture, IoC and Dependency Injection.

67 lines 3.19 kB
export type LogLevel = 'log' | 'error' | 'warn' | 'debug' | 'verbose' | 'fatal'; export interface LoggerService { log(message: any, ...optionalParams: any[]): any; error(message: any, ...optionalParams: any[]): any; warn(message: any, ...optionalParams: any[]): any; debug?(message: any, ...optionalParams: any[]): any; verbose?(message: any, ...optionalParams: any[]): any; fatal?(message: any, ...optionalParams: any[]): any; setLogLevels?(levels: LogLevel[]): any; } interface LogBufferRecord { methodRef: Function; arguments: unknown[]; } export declare class Logger implements LoggerService { protected context?: string; protected options: { timestamp?: boolean; }; protected static logBuffer: LogBufferRecord[]; protected static staticInstanceRef?: LoggerService; protected static logLevels?: LogLevel[]; private static isBufferAttached; protected localInstanceRef?: LoggerService; private static WrapBuffer; constructor(); constructor(context: string); constructor(context: string, options?: { timestamp?: boolean; }); get localInstance(): LoggerService; error(message: any, stack?: string, context?: string): void; error(message: any, ...optionalParams: [...any, string?, string?]): void; log(message: any, context?: string): void; log(message: any, ...optionalParams: [...any, string?]): void; warn(message: any, context?: string): void; warn(message: any, ...optionalParams: [...any, string?]): void; debug(message: any, context?: string): void; debug(message: any, ...optionalParams: [...any, string?]): void; verbose(message: any, context?: string): void; verbose(message: any, ...optionalParams: [...any, string?]): void; fatal(message: any, context?: string): void; fatal(message: any, ...optionalParams: [...any, string?]): void; static error(message: any, stackOrContext?: string): void; static error(message: any, context?: string): void; static error(message: any, stack?: string, context?: string): void; static error(message: any, ...optionalParams: [...any, string?, string?]): void; static log(message: any, context?: string): void; static log(message: any, ...optionalParams: [...any, string?]): void; static warn(message: any, context?: string): void; static warn(message: any, ...optionalParams: [...any, string?]): void; static debug(message: any, context?: string): void; static debug(message: any, ...optionalParams: [...any, string?]): void; static verbose(message: any, context?: string): void; static verbose(message: any, ...optionalParams: [...any, string?]): void; static fatal(message: any, context?: string): void; static fatal(message: any, ...optionalParams: [...any, string?]): void; static flush(): void; static attachBuffer(): void; static detachBuffer(): void; static getTimestamp(): string; static overrideLogger(logger: LoggerService | LogLevel[] | boolean): any; static isLevelEnabled(level: LogLevel): boolean; private registerLocalInstanceRef; } export {}; //# sourceMappingURL=logger.service.d.ts.map