/** * Parses a common log format line into structured components. * Supports Apache Common Log Format and Combined Log Format. * * @param logLine - The log line string to parse. * @param format - Log format: "common" or "combined" (default: "common"). * @returns An object containing parsed log components. * * @throws {Error} If logLine is empty. * @throws {Error} If format is not valid. * @throws {Error} If log line doesn't match expected format. * * @example * // Common format * const line = '127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326'; * parseLogLine(line); * // Returns { * // ip: "127.0.0.1", * // identity: "-", * // user: "frank", * // timestamp: "10/Oct/2000:13:55:36 -0700", * // method: "GET", * // path: "/apache_pb.gif", * // protocol: "HTTP/1.0", * // status: 200, * // size: 2326 * // } * * @example * // Combined format (with referer and user-agent) * const line = '127.0.0.1 - - [10/Oct/2000:13:55:36 -0700] "GET / HTTP/1.0" 200 2326 "http://example.com" "Mozilla/5.0"'; * parseLogLine(line, "combined"); * // Returns parsed object with additional referer and userAgent fields * * @note Common format includes: IP, identity, user, timestamp, request, status, size. * Combined format adds: referer and user-agent. * * @complexity Time: O(n), Space: O(1) - Where n is the length of log line */ export declare function parseLogLine(logLine: string, format?: 'common' | 'combined'): Record; //# sourceMappingURL=parseLogLine.d.ts.map