export interface LogContext {
    correlationId?: string;
    requestId?: string;
    userId?: string;
    sessionId?: string;
    traceId?: string;
    spanId?: string;
    [key: string]: unknown;
}
export interface LogEntry {
    timestamp: string;
    level: string;
    message: string;
    correlationId?: string;
    component?: string;
    context?: LogContext;
    error?: {
        name: string;
        message: string;
        stack?: string;
    };
    duration?: number;
    [key: string]: unknown;
}
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal';
export interface StructuredLoggerOptions {
    format?: 'json' | 'text';
    level?: LogLevel;
    component?: string;
    defaultContext?: LogContext;
    output?: (_entry: LogEntry) => void;
}
/**
 * Generate a unique correlation ID
 */
export declare function generateCorrelationId(): string;
/**
 * Structured logger with JSON support
 */
export declare class StructuredLogger {
    private readonly format;
    private readonly level;
    private readonly component?;
    private readonly defaultContext;
    private readonly output;
    private readonly levelPriority;
    constructor(options?: StructuredLoggerOptions);
    private outputText;
    private shouldLog;
    private createEntry;
    debug(message: string, context?: LogContext, duration?: number): void;
    info(message: string, context?: LogContext, duration?: number): void;
    warn(message: string, context?: LogContext, error?: Error, duration?: number): void;
    error(message: string, error?: Error, context?: LogContext, duration?: number): void;
    fatal(message: string, error?: Error, context?: LogContext): void;
    /**
     * Create a child logger with additional context
     */
    child(context: LogContext): StructuredLogger;
    /**
     * Create a timer for measuring operation duration
     */
    startTimer(): () => number;
}
/**
 * Global logger factory with structured logging support
 */
export declare class StructuredLoggerFactory {
    private static loggers;
    private static globalOptions;
    /**
     * Configure global logging options
     */
    static configure(options: StructuredLoggerOptions): void;
    /**
     * Get or create a logger for a component
     */
    static getLogger(component?: string): StructuredLogger;
    /**
     * Create a logger with correlation ID
     */
    static getLoggerWithCorrelation(component?: string, correlationId?: string): StructuredLogger;
}
//# sourceMappingURL=structured-logger.d.ts.map