/** * Logger configuration with size management and log rotation */ interface LoggerConfig { /** Maximum log file size in bytes (default: 5MB) */ maxSizeBytes: number; /** Number of old logs to keep (default: 3) */ maxRotatedFiles: number; /** Enable console output for errors (default: true) */ logErrorsToConsole: boolean; } /** * CLI-optimized logger with size management and rotation * * Features: * - Automatic log rotation when file exceeds max size * - Configurable retention (3 rotated files by default) * - Atomic write operations to prevent corruption * - Platform-aware log location (respects XDG_STATE_HOME on Linux) * - Detailed timestamps and structured log lines * - Sensitive information filtering on console output */ declare class Logger { private readonly logFile; private readonly config; private writeQueue; private isWriting; constructor(config?: Partial); /** * Resolve log file path following XDG Base Directory specification * and respecting environment overrides for testing */ private resolveLogPath; /** * Initialize log file and ensure directory exists */ private initializeLogFile; /** * Check if log file exceeds size limit and rotate if needed */ private rotateLogIfNeeded; /** * Queue write operation to prevent concurrent writes * This ensures log file integrity with atomic operations */ private queueWrite; /** * Process write queue sequentially to prevent concurrent writes */ private processQueue; /** * Write log entry with level and formatted message */ private writeLog; /** * Get the path to the current log file * Useful for users to locate and inspect logs */ getLogPath(): string; /** * Log entry at LOG level (general information) */ log(...args: unknown[]): void; /** * Log entry at INFO level (significant events) */ info(...args: unknown[]): void; /** * Log entry at WARN level (potentially harmful situations) */ warn(...args: unknown[]): void; /** * Log entry at ERROR level (error conditions) */ error(...args: unknown[]): void; /** * Log entry at DEBUG level (detailed diagnostic information) * Only written to file, not to console */ debug(...args: unknown[]): void; } export declare const logger: Logger; export {};