Know your audience’s hardware before you blame it. User Agent Parser reads the user-agent string out of access-log lines and classifies each request by browser, operating system and device type — with bots flagged separately so they don’t skew your picture of real human traffic.
Finding the user agent itself is the first step, and it works two ways. In standard combined-log format the UA sits in the last quoted field of the line (after the request and referrer fields), so the parser takes the final quoted segment and checks it looks like a real UA — containing telltale tokens like "Mozilla", "curl", "bot", "spider" or "http" — before trusting it. If a line doesn’t have that structure at all (for example you pasted bare user-agent strings, one per line, with no surrounding log fields), the parser falls back to treating the whole line as the UA. Either way, a line that produces nothing usable is counted as unparsed rather than silently dropped, so the "unclassified" number in the report tells you how much of your paste didn’t fit either shape.
Classification runs bot detection first: a line matching known crawler and tooling signatures (googlebot, bingbot, Slurp, DuckDuckBot, Baiduspider, Yandex, social-media link previewers, curl, wget, common HTTP client libraries) is flagged as a bot immediately and skipped for browser/OS classification, because "Chrome" inside a spoofed bot string would otherwise pollute your human browser stats. Everything else goes through simple, readable keyword rules for browser (Edge, Opera, Firefox, Chrome, Safari, in that priority order since some UAs contain multiple tokens) and OS (iOS, Android, Windows, macOS, Linux), plus a mobile/desktop split based on device keywords in the string.