UNPKG

@libj/logger

Version:
21 lines (20 loc) 697 B
import { LoggerLevel } from '../LoggerLevel'; import { LoggerArg } from '../LoggerInterface'; type FormatArgs = [string] | [string, LoggerArg[]] | [LoggerLevel, string] | [LoggerLevel, string, LoggerArg[]]; interface Options { prefix?: string; timestamp?: boolean | (() => string); } export declare abstract class BaseLogger { constructor(options?: Options); /*** Public ***/ setOptions(options: Options): void; /*** Protected ***/ protected options: Options; protected format(...args: FormatArgs): string; protected sprintf(message: string, args: LoggerArg[]): any; /*** Private ***/ private extractFormatArgs; private isSprintfError; } export {};