/** * Defines the available logging levels as string literals. */ export declare const LogLevels: readonly ["trace", "debug", "info", "warn", "error", "none"]; /** * Type for LogLevel values */ export type LogLevel = typeof LogLevels[number]; /** * Interface for a logging backend implementation. * Backends handle the actual output of log messages. */ export interface LoggingBackend { /** * Log a message at TRACE level * * @param category - Typically the class or module name * @param message * @param args */ trace(category: string, message: string, ...args: unknown[]): void; /** * Log a message at DEBUG level * * @param category - Typically the class or module name * @param message * @param args */ debug(category: string, message: string, ...args: unknown[]): void; /** * Log a message at INFO level * * @param category - Typically the class or module name * @param message * @param args */ info(category: string, message: string, ...args: unknown[]): void; /** * Log a message at WARN level * * @param category - Typically the class or module name * @param message * @param args */ warn(category: string, message: string, ...args: unknown[]): void; /** * Log a message at ERROR level * * @param category - Typically the class or module name * @param message * @param args */ error(category: string, message: string, ...args: unknown[]): void; /** * Start a timer with the specified label. * * @param category - Typically the class or module name * @param label - Must be unique; used to match with timeEnd() */ time(category: string, label: string): void; /** * End a timer with the specified label and log the time elapsed. * * @param category - Typically the class or module name * @param label - Must match a previous time() call */ timeEnd(category: string, label: string): void; } /** * Interface for a logger instance. * Each instance is typically associated with a specific category/component. */ export interface LoggerInterface { /** Log a message at TRACE level */ trace(message: string, ...args: unknown[]): void; /** Log a message at DEBUG level */ debug(message: string, ...args: unknown[]): void; /** Log a message at INFO level */ info(message: string, ...args: unknown[]): void; /** Log a message at WARN level */ warn(message: string, ...args: unknown[]): void; /** Log a message at ERROR level */ error(message: string, ...args: unknown[]): void; /** Start a timer with the given label */ time(label: string): void; /** End a timer and log the elapsed time */ timeEnd(label: string): void; }