type SyncFileSystem = {
    appendFileSync(file: string, data: string): void;
    existsSync(path: string): boolean;
    mkdirSync(path: string, options?: {
        recursive?: boolean;
    }): void;
    realpathSync(path: string): string;
    renameSync(oldPath: string, newPath: string): void;
    statSync(path: string): {
        size: number;
    };
    unlinkSync(path: string): void;
    writeFileSync(path: string, data: string, options?: {
        encoding?: BufferEncoding;
    }): void;
};
export interface ErrorContext {
    operation?: string;
    component?: string;
    apiEndpoint?: string;
    httpStatus?: number;
    requestBody?: unknown;
    responseBody?: unknown;
    [key: string]: unknown;
}
export interface ErrorLogEntry {
    timestamp: string;
    level: "ERROR" | "WARN";
    message: string;
    stack?: string;
    context?: ErrorContext;
}
export interface ErrorLoggerOptions {
    fs: SyncFileSystem;
    logDir: string;
    logToStderr?: boolean;
    maxSize?: number;
    maxBackups?: number;
    now?: () => Date;
}
export declare class ErrorLogger {
    private readonly fs;
    private readonly logFilePath;
    private readonly logToStderr;
    private readonly maxSize;
    private readonly maxBackups;
    private readonly now;
    private fileLoggingAvailable;
    constructor(options: ErrorLoggerOptions);
    logError(error: Error | string, context?: ErrorContext): void;
    logWarning(message: string, context?: ErrorContext): void;
    logErrorWithStackTrace(error: Error, operation: string, context?: ErrorContext): void;
    private createErrorEntry;
    private createWarningEntry;
    private writeEntry;
    private formatEntry;
    private writeToStderr;
    private rotateIfNeeded;
    private performRotation;
    private buildBackupPath;
    private ensureLogDirectory;
}
export {};
