cross-log
Version:
A universal logging package that works in both browser and Node.js environments with environment variable configuration
33 lines • 1.23 kB
TypeScript
/**
* Edge Runtime logger implementation
* Compatible with Vercel Edge Functions, Cloudflare Workers, and other Edge Runtimes
*/
import { BaseLogger } from './base';
import { LogLevel, LogEntry, PartialLoggerConfig } from '../core/types';
/**
* Edge-specific logger that works in Edge Runtime environments
* Uses only Web APIs and avoids Node.js-specific features
*/
export declare class EdgeLogger extends BaseLogger {
constructor(config?: PartialLoggerConfig);
/**
* Output log implementation for Edge Runtime
* Uses console methods which are available in Edge environments
*/
protected outputLog(level: LogLevel, formattedMessage: string, _logEntry: LogEntry, ...args: unknown[]): void;
/**
* Output stack trace for Edge Runtime
* Limited stack trace support in Edge environments
*/
protected outputStackTrace(error: Error): void;
/**
* Edge-specific configuration
* Disables features not available in Edge Runtime
*/
configure(config: PartialLoggerConfig): void;
}
/**
* Factory function to create an Edge logger instance
*/
export declare function createEdgeLogger(config?: PartialLoggerConfig): EdgeLogger;
//# sourceMappingURL=edge.d.ts.map