Step Into Labs

Step Into Rust · Module exam · Robust Rust

Exam: The Log Analyzer

Parse log lines into borrowed structs, count with a HashMap and report bad lines properly.

Part of Step Into Rust. The full module exam, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

A service writes lines like ERROR disk: full. Thousands of them. Build the analyzer that reads the whole log, counts the levels, finds the noisiest module and the first error, and reports every malformed line with its line number. It must not copy a single message: each parsed entry borrows from the input.

In this module exam

Missions

  1. Analyze the log