Implement a command-line tool /root/query logs.py that parses a custom log format and answers queries. The…
Implement a command-line tool /root/query logs.py that parses a custom log format and answers queries. The…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Log format: Each line is a log entry. Lines are separated by LF ( \n ). The final line may or may not end…
The task
**Log format:** Each line is a log entry. Lines are separated by LF (`\n`). The final line may or may not end with LF. Each entry has tab-separated fields: ``` timestamp<TAB>level<TAB>message ``` - `timestamp`: ISO 8601 format `YYYY-MM-DDTHH:MM:SS`. Always in UTC. May end with `Z` or `+00:00`. Fractional seconds are…
Part of ai-and/termgrade-environments.