@nodedaemon/core
Version:
Production-ready Node.js process manager with zero external dependencies
28 lines • 989 B
TypeScript
import { EventEmitter } from 'events';
import { LogEntry } from '../types';
export declare class LogManager extends EventEmitter {
private logStreams;
private logBuffer;
private bufferIndex;
private isShuttingDown;
constructor();
private setupMainLogStream;
private createLogStream;
log(entry: LogEntry): void;
info(message: string, data?: any, processId?: string): void;
warn(message: string, data?: any, processId?: string): void;
error(message: string, data?: any, processId?: string): void;
debug(message: string, data?: any, processId?: string): void;
private addToBuffer;
getRecentLogs(count?: number, processId?: string): LogEntry[];
private formatLogEntry;
private checkLogRotation;
private rotateLog;
private rotateLogFiles;
private compressAndMove;
cleanup(): void;
shutdown(): Promise<void>;
getTotalLogSize(): number;
getLogFiles(): string[];
}
//# sourceMappingURL=LogManager.d.ts.map