UNPKG

logs-interceptor

Version:

High-performance, production-ready log interceptor for Node.js applications with Loki integration. Built with Clean Architecture principles. Supports Node.js, Browser, and Node-RED.

30 lines 795 B
import { LogEntry } from '../entities/LogEntry'; /** * Interface for log transport implementations * Follows Interface Segregation Principle */ export interface ILogTransport { /** * Send logs to the transport destination */ send(entries: LogEntry[]): Promise<void>; /** * Check if transport is available */ isAvailable(): Promise<boolean>; /** * Get transport health status */ getHealth(): TransportHealth; /** * Destroy the transport and cleanup resources */ destroy(): Promise<void>; } export interface TransportHealth { readonly healthy: boolean; readonly lastSuccessfulSend?: number; readonly consecutiveFailures: number; readonly errorMessage?: string; } //# sourceMappingURL=ILogTransport.d.ts.map