Write a Python script /app/log analyzer.py that reads a system log file from a given path and outputs a…
Write a Python script /app/log analyzer.py that reads a system log file from a given path and outputs a…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Goal : Parse system log lines in a simplified syslog-style format. Produce a JSON object summarizing: - Total…
The task
**Goal**: Parse system log lines in a simplified syslog-style format. Produce a JSON object summarizing: - Total number of lines processed (including malformed/empty lines, but see rules below). - Number of valid log entries. - Number of invalid log entries. - For each **unique host** (case-insensitive), the count of…
Part of ai-and/termgrade-environments.