Write a Python script /app/analyze.py that reads a system-log file and produces a strict JSON report.
Write a Python script /app/analyze.py that reads a system-log file and produces a strict JSON report.: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Goal: Parse a log file containing timestamped events, extract structured information, and output a single JSON…
The task
**Goal:** Parse a log file containing timestamped events, extract structured information, and output a single JSON object to stdout that summarizes the findings according to the exact contract below. The script must handle all edge cases silently—no crashes, no partial output, no debugging prints.
Part of ai-and/termgrade-environments.