Implement a command-line tool /app/logq that filters and formats log events from stdin. The tool reads a…
Implement a command-line tool /app/logq that filters and formats log events from stdin. The tool reads a…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin, binary): - A sequence of log events, each exactly 20 bytes: - Bytes 0-1: event type…
The task
**Input format (stdin, binary):** - A sequence of log events, each exactly 20 bytes: - Bytes 0-1: event_type (unsigned 16-bit big-endian integer) - Bytes 2-9: timestamp (signed 64-bit big-endian integer, microseconds since Unix epoch) - Bytes 10-13: user_id (unsigned 32-bit big-endian integer) - Bytes 14-19: value…
Part of ai-and/termgrade-environments.