Write a command-line tool at /app/analyze log.py that reads a syslog-style log file and produces a strict…
Write a command-line tool at /app/analyze log.py that reads a syslog-style log file and produces a strict…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input Log Format: - Each line is a log entry with the format: <TIMESTAMP <HOST <SERVICE <PID : <MESSAGE -…
The task
**Input Log Format:** - Each line is a log entry with the format: `<TIMESTAMP> <HOST> <SERVICE>[<PID>]: <MESSAGE>` - `<TIMESTAMP>` is in ISO 8601 format with space separator: `YYYY-MM-DD HH:MM:SS±HH:MM` or `YYYY-MM-DD HH:MM:SSZ` (UTC). Fractional seconds may be present (1-6 digits after a decimal point). - `<HOST>`…
Part of ai-and/termgrade-environments.