Create a command-line tool /app/process logs.py that reads an HTTP access log from stdin, applies several…
Create a command-line tool /app/process logs.py that reads an HTTP access log from stdin, applies several…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): Lines in Combined Log Format (Apache-style), but with a twist: IP - -…
The task
**Input format (stdin):** Lines in Combined Log Format (Apache-style), but with a twist: ``` IP - - [DD/Mon/YYYY:HH:MM:SS +TZTZ] "METHOD /path?query HTTP/1.X" STATUS SIZE "REFERER" "USER_AGENT" RESPONSE_TIME ``` Where RESPONSE_TIME is a float in milliseconds at the end of the line (not standard CLF). Example: ```…
Part of ai-and/termgrade-environments.