Write a command-line tool in Python 3 that reads an Apache-style combined log file (CLF) from stdin…
Write a command-line tool in Python 3 that reads an Apache-style combined log file (CLF) from stdin…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). The tool must: 1. Parse every log line. The format is EXACTLY: %h %l %u %t "%r" % s %b "%{Referer}i"…
The task
The tool must: 1. Parse every log line. The format is EXACTLY: `%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"` - `%t` is `[day/month/year:hour:minute:second zone]` where day is 2 digits (zero-padded), month is a 3-letter abbreviation, year is 4 digits, time is `HH:MM:SS`, and zone is `+HHMM` or `-HHMM`. -…
Part of ai-and/termgrade-environments.