/**
 * Production-grade structured logging system
 * Provides performance tracing and operational visibility
 */
export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';
export interface LogEntry {
    timestamp: string;
    level: LogLevel;
    message: string;
    component: string;
    operation?: string;
    moduleId?: string;
    duration?: number;
    error?: {
        name: string;
        message: string;
        stack?: string;
        code?: string;
    };
    metadata?: Record<string, unknown>;
    traceId?: string;
    spanId?: string;
}
export interface LoggerConfig {
    level: LogLevel;
    format: 'json' | 'pretty';
    enableTracing: boolean;
    enableColors: boolean;
    timestamp: boolean;
    includeStack: boolean;
}
/**
 * Performance tracer for tracking operation latency
 */
export declare class PerformanceTrace {
    private readonly startTime;
    private readonly operation;
    private readonly metadata;
    private completed;
    constructor(operation: string, metadata?: Record<string, unknown>);
    /**
     * Complete the trace and log the duration
     */
    complete(logger: Logger, result?: 'success' | 'error', error?: Error): number;
    /**
     * Get current duration without completing the trace
     */
    getCurrentDuration(): number;
}
/**
 * Production logger with structured output and tracing
 */
export declare class Logger {
    private readonly config;
    private readonly component;
    private static readonly LOG_LEVELS;
    private static readonly COLORS;
    private static readonly RESET_COLOR;
    constructor(component: string, config?: Partial<LoggerConfig>);
    /**
     * Create a child logger with additional context
     */
    child(additionalComponent: string, metadata?: Record<string, unknown>): Logger;
    /**
     * Start a performance trace
     */
    startTrace(operation: string, metadata?: Record<string, unknown>): PerformanceTrace;
    /**
     * Measure and log the execution of an async operation
     */
    measureAsync<T>(operation: string, fn: () => Promise<T>, metadata?: Record<string, unknown>): Promise<T>;
    /**
     * Measure and log the execution of a sync operation
     */
    measureSync<T>(operation: string, fn: () => T, metadata?: Record<string, unknown>): T;
    trace(message: string, metadata?: Record<string, unknown>): void;
    debug(message: string, metadata?: Record<string, unknown>): void;
    info(message: string, metadata?: Record<string, unknown>): void;
    warn(message: string, metadata?: Record<string, unknown>): void;
    error(message: string, error?: Error | Record<string, unknown>, metadata?: Record<string, unknown>): void;
    fatal(message: string, error?: Error | Record<string, unknown>, metadata?: Record<string, unknown>): void;
    private log;
    private shouldLog;
    private formatLogEntry;
    private generateTraceId;
    private generateSpanId;
    /**
     * Update logger configuration
     */
    updateConfig(config: Partial<LoggerConfig>): void;
    /**
     * Get current configuration
     */
    getConfig(): LoggerConfig;
}
/**
 * Global logger factory and manager
 */
export declare class LoggerFactory {
    private static readonly loggers;
    private static readonly globalConfig;
    /**
     * Get or create a logger for a component
     */
    static getLogger(component: string): Logger;
    /**
     * Update global configuration for all loggers
     */
    static updateGlobalConfig(config: Partial<LoggerConfig>): void;
    /**
     * Set log level for all loggers
     */
    static setLevel(level: LogLevel): void;
    /**
     * Enable or disable tracing for all loggers
     */
    static setTracing(enabled: boolean): void;
    /**
     * Set output format for all loggers
     */
    static setFormat(format: 'json' | 'pretty'): void;
    /**
     * Get all registered loggers
     */
    static getAllLoggers(): Map<string, Logger>;
    /**
     * Clear all loggers
     */
    static clearAll(): void;
}
export declare const moduleSystemLogger: Logger;
export declare const moduleLoaderLogger: Logger;
export declare const moduleRegistryLogger: Logger;
export declare const moduleResolverLogger: Logger;
//# sourceMappingURL=logger.d.ts.map