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.

25 lines 1.11 kB
/** * Infrastructure: LogFilterService * Implements log filtering and sanitization */ import { ILogFilterService } from '../../domain/services/ILogFilterService'; import { LogLevel } from '../../domain/entities/LogEntry'; import { LogEntry } from '../../domain/entities/LogEntry'; import { ISanitizationService } from './ISanitizationService'; import { ISamplingService } from './ISamplingService'; export interface FilterConfig { readonly levels: readonly LogLevel[]; readonly patterns?: readonly RegExp[]; readonly samplingRate?: number; readonly maxMessageLength?: number; readonly sanitize?: boolean; } export declare class LogFilterService implements ILogFilterService { private readonly config; private readonly sanitizationService; private readonly samplingService; constructor(config: FilterConfig, sanitizationService: ISanitizationService, samplingService: ISamplingService); shouldProcess(level: LogLevel, message: string, context?: Record<string, unknown>): boolean; sanitize(entry: LogEntry): LogEntry; } //# sourceMappingURL=LogFilterService.d.ts.map