UNPKG

@invisiblecities/sidequest-cqo

Version:

Configuration-agnostic TypeScript and ESLint orchestrator with real-time watch mode, SQLite persistence, and intelligent terminal detection

92 lines 2.56 kB
/** * @fileoverview Debug Logger Utility * * Provides conditional debug logging that can be enabled with --debug flag. * Logs are timestamped and categorized for better troubleshooting. */ interface DebugLogEntry { timestamp: string; level: "debug" | "info" | "warn" | "error"; component: string; message: string; data?: any; } export declare class DebugLogger { private static isDebugEnabled; private static logs; private static maxLogs; /** * Enable debug mode globally */ static enable(): void; /** * Disable debug mode */ static disable(): void; /** * Check if debug mode is enabled */ static get enabled(): boolean; /** * Debug level logging (only shows when debug enabled) */ static debug(component: string, message: string, data?: any): void; /** * Info level logging (always shows) */ static info(component: string, message: string, data?: any): void; /** * Warning level logging (always shows) */ static warn(component: string, message: string, data?: any): void; /** * Error level logging (always shows) */ static error(component: string, message: string, data?: any): void; /** * Get all debug logs (useful for diagnostics) */ static getLogs(): DebugLogEntry[]; /** * Get logs for a specific component */ static getLogsForComponent(component: string): DebugLogEntry[]; /** * Clear all logs */ static clearLogs(): void; /** * Export logs to string for debugging */ static exportLogs(): string; /** * Write logs to file (for persistent debugging) */ static writeLogsToFile(filePath?: string): Promise<void>; /** * Create a log entry with timestamp */ private static createLogEntry; /** * Add log entry and manage log rotation */ private static addLogEntry; } /** * Convenience function for debug logging */ export declare function debugLog(component: string, message: string, data?: any): void; /** * Convenience function for info logging */ export declare function infoLog(component: string, message: string, data?: any): void; /** * Convenience function for warn logging */ export declare function warnLog(component: string, message: string, data?: any): void; /** * Convenience function for error logging */ export declare function errorLog(component: string, message: string, data?: any): void; export {}; //# sourceMappingURL=debug-logger.d.ts.map