Implement a command-line tool /root/logparse that reads a log file from stdin and outputs a summary to stdout.
Implement a command-line tool /root/logparse that reads a log file from stdin and outputs a summary to stdout.: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): - One log entry per line, fields separated by exactly one pipe character . - Line…
The task
**Input format (stdin):** - One log entry per line, fields separated by exactly one pipe character `|`. - Line structure: `TIMESTAMP|LEVEL|SERVICE|MESSAGE` - `TIMESTAMP` is ISO-8601 with timezone: `YYYY-MM-DDTHH:MM:SS±HH:MM` (the offset separator is always a colon, and the sign is always present for non-UTC; UTC may…
Part of ai-and/termgrade-environments.