cross-log
Version:
A universal logging package that works in both browser and Node.js environments with environment variable configuration
26 lines • 825 B
TypeScript
/**
* Node.js-specific logger implementation
*/
import { BaseLogger } from './base';
import { LoggerConfig, LogLevel, LogEntry } from '../core/types';
export declare class NodeLogger extends BaseLogger {
private originalConsole;
constructor(initialConfig?: Partial<LoggerConfig>);
/**
* Output log with Node.js-specific ANSI coloring
*/
protected outputLog(level: LogLevel, formattedMessage: string, _logEntry: LogEntry, ...args: unknown[]): void;
/**
* Output stack trace for errors
*/
protected outputStackTrace(error: Error): void;
/**
* Get original console method to avoid infinite recursion
*/
private getOriginalConsoleMethod;
/**
* Get ANSI color code for log level
*/
private getAnsiColorForLevel;
}
//# sourceMappingURL=node.d.ts.map