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 773 B
/** * Interface for context propagation */ export interface IContextProvider { /** * Get current context */ getContext(): Record<string, unknown>; /** * Run a function with context */ runWithContext<T>(context: Record<string, unknown>, fn: () => T): T; /** * Run an async function with context */ runWithContextAsync<T>(context: Record<string, unknown>, fn: () => Promise<T>): Promise<T>; /** * Set a value in the current context */ set(key: string, value: unknown): void; /** * Get a value from the current context */ get<T = unknown>(key: string): T | undefined; /** * Clear the current context */ clear(): void; } //# sourceMappingURL=IContextProvider.d.ts.map