/**
 * Structured Logger for Grok CLI
 * Provides consistent logging across the application with levels and context
 *
 * Environment Variables:
 * - DEBUG=true or DEBUG=1: Enable debug mode (sets log level to 'debug')
 * - LOG_LEVEL=debug|info|warn|error: Set specific log level
 * - LOG_FORMAT=json|text: Output format (default: text)
 * - LOG_FILE=path: Write logs to file (in addition to console)
 * - NO_COLOR=1: Disable colored output
 */
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
export type LogFormat = 'text' | 'json';
export interface LogContext {
    [key: string]: unknown;
}
export interface LogEntry {
    timestamp: string;
    level: LogLevel;
    message: string;
    context?: LogContext;
    source?: string;
}
export interface LoggerOptions {
    level: LogLevel;
    format: LogFormat;
    enableColors: boolean;
    enableTimestamps: boolean;
    source?: string;
    silent?: boolean;
    logFile?: string;
}
/**
 * Check if debug mode is enabled via environment
 */
declare function isDebugEnabled(): boolean;
/**
 * Structured Logger class
 */
export declare class Logger {
    private options;
    private logHistory;
    private maxHistorySize;
    private fileStream?;
    constructor(options?: Partial<LoggerOptions>);
    /**
     * Initialize file logging
     */
    private initializeFileLogging;
    /**
     * Create a child logger with additional context
     */
    child(source: string): Logger;
    /**
     * Set log level
     */
    setLevel(level: LogLevel): void;
    /**
     * Get current log level
     */
    getLevel(): LogLevel;
    /**
     * Enable or disable silent mode
     */
    setSilent(silent: boolean): void;
    /**
     * Check if a log level should be output
     */
    private shouldLog;
    /**
     * Format timestamp
     */
    private formatTimestamp;
    /**
     * Format log entry for output
     */
    /** Safe JSON.stringify that handles circular references and Error objects */
    private safeStringify;
    private formatEntry;
    /**
     * Core log method
     */
    private log;
    /**
     * Check if debug logging is enabled
     */
    isDebugEnabled(): boolean;
    /**
     * Close file stream
     */
    close(): void;
    /**
     * Debug level log
     */
    debug(message: string, context?: LogContext): void;
    /**
     * Info level log
     */
    info(message: string, context?: LogContext): void;
    /**
     * Warning level log
     */
    warn(message: string, context?: LogContext): void;
    /**
     * Error level log
     */
    error(message: string, context?: LogContext): void;
    error(message: string, error: Error, context?: LogContext): void;
    /**
     * Log with timing
     */
    time(label: string): () => void;
    /**
     * Get log history
     */
    getHistory(): LogEntry[];
    /**
     * Clear log history
     */
    clearHistory(): void;
    /**
     * Export logs as JSON
     */
    exportLogsAsJSON(): string;
}
/**
 * Get the default logger instance
 */
export declare function getLogger(): Logger;
/**
 * Create a new logger instance
 */
export declare function createLogger(options?: Partial<LoggerOptions>): Logger;
/**
 * Reset the default logger (for testing)
 */
export declare function resetLogger(): void;
export declare const logger: {
    debug: (message: string, context?: LogContext) => void;
    info: (message: string, context?: LogContext) => void;
    warn: (message: string, context?: LogContext) => void;
    error: (message: string, errorOrContext?: Error | LogContext, context?: LogContext) => void;
    isDebugEnabled: () => boolean;
    time: (label: string) => () => void;
    child: (source: string) => Logger;
};
/**
 * Check if debug mode is enabled (for use outside logger)
 */
export { isDebugEnabled };
/**
 * Debug utility - only logs if DEBUG is enabled
 * Usage: debug('message') or debug('message', { context })
 */
export declare function debug(message: string, context?: LogContext): void;
