cross-log
Version:
A universal logging package that works in both browser and Node.js environments with environment variable configuration
30 lines • 971 B
TypeScript
/**
* Node.js-specific logger implementation
*/
import { BaseLogger } from './base';
import { LogLevel, LogEntry, PartialLoggerConfig } from '../core/types';
export declare class NodeLogger extends BaseLogger {
private originalConsole;
constructor(initialConfig?: PartialLoggerConfig);
/**
* 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;
}
/**
* Factory function to create a node logger instance
*/
export declare function createLogger(config?: PartialLoggerConfig): NodeLogger;
//# sourceMappingURL=node.d.ts.map