/** * 日志收集器 * 拦截 console 方法并收集日志到内存缓冲 */ export type LogLevel = 'debug' | 'info' | 'warn' | 'error'; export interface LogEntry { id: string; timestamp: Date; level: LogLevel; source: string; message: string; raw: string[]; } interface LogStore { add(entry: LogEntry): void; getAll(): LogEntry[]; getCount(): number; clear(): void; } /** * 初始化日志收集器 */ export declare function initLogger(logStore: LogStore): void; /** * 恢复原始 console 方法 */ export declare function restoreConsole(): void; /** * 手动添加日志条目(用于特殊场景) */ export declare function log(level: LogLevel, source: string, ...args: unknown[]): void; export {}; //# sourceMappingURL=logger.d.ts.map