Write a Python script /app/log report.py that reads a web server log file from stdin and writes a JSON…
Write a Python script /app/log report.py that reads a web server log file from stdin and writes a JSON…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input contract: - The log is UTF-8 encoded, one entry per line, LF separated. - CLF format: remotehost rfc931…
The task
Input contract: - The log is UTF-8 encoded, one entry per line, LF separated. - CLF format: `remotehost rfc931 authuser [DD/Mon/YYYY:HH:MM:SS -ZZZZ] "METHOD /path HTTP/1.0" status bytes "referrer" "user_agent"` - Lines that are empty or do not match exactly 9 space-separated tokens (with the datetime in brackets and…
Part of ai-and/termgrade-environments.