import { ILogger, ILoggerConfig } from './_types'; import { IDisposable } from '../Types'; export default abstract class Logger implements ILogger { #private; static openLevel: string; static closeLevel: string; constructor(config?: ILoggerConfig); debug(msg: string, ...args: unknown[]): void; debugError(err: Error, msg?: string, ...args: unknown[]): void; error(msg: string, ...args: unknown[]): void; errorError(err: Error, msg?: string, ...args: unknown[]): void; info(msg: string, ...args: unknown[]): void; infoError(err: Error, msg?: string, ...args: unknown[]): void; trace(msg: string, ...args: unknown[]): void; traceError(err: Error, msg?: string, ...args: unknown[]): void; warn(msg: string, ...args: unknown[]): void; warnError(err: Error, msg?: string, ...args: unknown[]): void; scope(name: string): ILogger & IDisposable; /** * Calls the implementation of the logging level * @param level * @param msg * @param args extra objects/values to include with the log message */ private log; /** * Implementation for a Log message flagged at the Error log level * @param msg * @param args extra objects/values to include with the log message */ protected abstract _errorMethod(message: string, ...args: unknown[]): void; /** * Implementation for a Log message flagged at the Warning log level * @param msg * @param args extra objects/values to include with the log message */ protected abstract _warnMethod(message: string, ...args: unknown[]): void; /** * Implementation for a Log message flagged at the Informational log level * @param msg * @param args extra objects/values to include with the log message */ protected abstract _infoMethod(message: string, ...args: unknown[]): void; /** * Implementation for a Log message flagged at the Trace log level * @param msg * @param args extra objects/values to include with the log message */ protected abstract _traceMethod(message: string, ...args: unknown[]): void; /** * Implementation for a Log message flagged at the Debug log level * @param msg * @param args extra objects/values to include with the log message */ protected abstract _debugMethod(message: string, ...args: unknown[]): void; /** * Implementation for a Log message not flagged * @param msg * @param args extra objects/values to include with the log message */ protected abstract _defaultMethod(message: string, ...args: unknown[]): void; }