/** * A logger accepts messages from different levels * and emits them in a certain way. */ export declare abstract class Logger { /** * All available logging levels. * @type {{trace: number; debug: number; info: number; warn: number; error: number; fatal: number}} */ static readonly LEVELS: Record; /** * Convert a string-based logging level to a numerical logging level. * @param level A string-based logging level * @return The numerical logging level, or undefined. */ static getLevelOrdinal(level: string): number; protected readonly activeLogGroups: Record void; }>; protected repetitionCounter: number; protected readonly groupedLogLimit = 5; abstract trace(message: string, data?: any): void; abstract debug(message: string, data?: any): void; abstract info(message: string, data?: any): void; abstract warn(message: string, data?: any): void; abstract error(message: string, data?: any): void; abstract fatal(message: string, data?: any): void; /** * Log a message that might be repeated, preventing console spam. * If the same key is passed multiple times, * only the first time the emit callback will be invoked immediately. * All subsequent calls will be buffered, * until at least {@link Logger#groupedLogLimit} other logGrouped calls are made, * or {@link Logger#flush} is called. * @param key A unique key for this message (e.g. the message template). * @param emit A callback to emit the message. */ logGrouped(key: string, emit: (count: number) => void): void; /** * Flush all active log groups. */ flush(): void; }