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.

36 lines 1.41 kB
/** * Infrastructure: ConfigLoader * Loads and validates configuration from environment variables and user input */ import { LoggerConfig } from '../../presentation/LoggerFactory'; export interface EnvironmentConfig { LOGS_INTERCEPTOR_URL?: string; LOGS_INTERCEPTOR_TENANT_ID?: string; LOGS_INTERCEPTOR_AUTH_TOKEN?: string; LOGS_INTERCEPTOR_APP_NAME?: string; LOGS_INTERCEPTOR_ENVIRONMENT?: string; LOGS_INTERCEPTOR_VERSION?: string; LOGS_INTERCEPTOR_LABELS?: string; LOGS_INTERCEPTOR_BUFFER_SIZE?: string; LOGS_INTERCEPTOR_FLUSH_INTERVAL?: string; LOGS_INTERCEPTOR_LOG_LEVEL?: string; LOGS_INTERCEPTOR_ENABLED?: string; LOGS_INTERCEPTOR_DEBUG?: string; LOGS_INTERCEPTOR_SAMPLING_RATE?: string; LOGS_INTERCEPTOR_CIRCUIT_BREAKER?: string; LOGS_INTERCEPTOR_SANITIZE?: string; LOGS_INTERCEPTOR_MAX_MEMORY_MB?: string; } /** * Load configuration from environment variables */ export declare function loadConfigFromEnv(): Partial<LoggerConfig>; /** * Merge configurations with precedence: user config > env config > defaults */ export declare function mergeConfigs(userConfig: Partial<LoggerConfig>, envConfig: Partial<LoggerConfig>): Partial<LoggerConfig>; /** * Validate that required configuration is present */ export declare function validateConfig(config: Partial<LoggerConfig>): string[]; //# sourceMappingURL=ConfigLoader.d.ts.map