/**
 * Proxy Request Logger
 * Logs proxy request/response metadata to a rotating log file.
 * Useful for debugging and auditing proxy traffic.
 */
import type { RequestLogEntry } from "../types/index.js";
export declare function initRequestLogger(enabled?: boolean): void;
export declare function logRequest(entry: RequestLogEntry): Promise<void>;
export declare function getLogDir(): string | null;
/**
 * Log the FULL raw request and response for debugging.
 * Writes to a separate file: proxy-debug-YYYY-MM-DD.jsonl
 * Each entry has the complete request body and response body.
 *
 * Sensitive headers and body fields are redacted before writing.
 */
export declare function logFullRequestResponse(entry: {
    timestamp: string;
    requestId: string;
    account: string;
    model: string;
    stream: boolean;
    requestHeaders: Record<string, string>;
    requestBody: unknown;
    requestBodySize: number;
    responseStatus: number;
    responseHeaders?: Record<string, string>;
    responseBody?: string;
    responseBodySize?: number;
    durationMs: number;
}): Promise<void>;
/**
 * Log a mid-stream error that occurs after the initial 200 was sent.
 * These are invisible in normal request logs since the 200 was already recorded.
 */
export declare function logStreamError(entry: {
    timestamp: string;
    requestId: string;
    account: string;
    model: string;
    errorMessage: string;
    durationMs: number;
}): Promise<void>;
/**
 * Clean up old log files by age and total size.
 * - Deletes files older than maxAgeDays
 * - If remaining files exceed maxSizeMb, deletes oldest until under limit
 * Non-fatal — proxy keeps working even if cleanup fails.
 */
export declare function cleanupLogs(maxAgeDays?: number, maxSizeMb?: number): void;
