/** * Structured logging system for Playwright Oracle Reporter * Copyright (c) 2026 Mihajlo Stojanovski */ /** * Log levels (ordered by severity) */ export declare enum LogLevel { DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3, FATAL = 4 } /** * Log entry structure */ export interface LogEntry { timestamp: string; level: LogLevel; message: string; context?: Record; error?: unknown; } /** * Logger configuration */ export interface LoggerConfig { minLevel: LogLevel; silent: boolean; prettyPrint: boolean; } /** * Structured logger with proper error handling */ export declare class Logger { private static instance; private config; private constructor(); /** * Get singleton logger instance */ static getInstance(config?: Partial): Logger; /** * Parse log level from environment variable */ private getLogLevelFromEnv; /** * Check if log level should be output */ private shouldLog; /** * Format log entry for output */ private format; /** * Write log entry */ private write; /** * Log debug message */ debug(message: string, context?: Record): void; /** * Log info message */ info(message: string, context?: Record): void; /** * Log warning message */ warn(message: string, context?: Record): void; /** * Log error message */ error(message: string, error?: unknown, context?: Record): void; /** * Log fatal error (terminates process) */ fatal(message: string, error?: unknown, context?: Record): never; /** * Create a child logger with additional context */ child(baseContext: Record): ChildLogger; } /** * Child logger that inherits parent configuration with additional context */ export declare class ChildLogger { private parent; private baseContext; constructor(parent: Logger, baseContext: Record); private mergeContext; debug(message: string, context?: Record): void; info(message: string, context?: Record): void; warn(message: string, context?: Record): void; error(message: string, error?: unknown, context?: Record): void; fatal(message: string, error?: unknown, context?: Record): never; } /** * Get default logger instance */ export declare function getLogger(): Logger; /** * Create logger with specific config */ export declare function createLogger(config?: Partial): Logger; //# sourceMappingURL=logger.d.ts.map