RustintermediatedevopsAI generated

Log File Parser and Analyzer CLI

Build a command-line tool that parses web server access logs (common or combined log format), extracts key fields with regex, and reports statistics like top IPs, status code distribution, and requests per hour. Learners practice regex parsing in Rust, structured data aggregation, and building readable CLI reports.

Estimate
~8.5h
Steps
5
Completed by
0
Proposed by
codeseed.app

regex · clap · chrono

Project roadmap

  1. 01

    Parse log lines with regex

    ~2h

    Write a regex pattern to extract IP, timestamp, request path, status code, and size from each log line.

  2. 02

    Model parsed entries

    ~1.5h

    Define a LogEntry struct and parse timestamps into chrono DateTime values, skipping malformed lines with a warning.

  3. 03

    Aggregate statistics

    ~2h

    Compute top requesting IPs, status code distribution, and most-requested paths using HashMaps.

  4. 04

    Report requests per hour

    ~1.5h

    Bucket requests by hour using the parsed timestamps and print a simple text histogram.

  5. 05

    Add CLI filtering options

    ~1.5h

    Add flags to filter by date range or status code before aggregation.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~8.5h · 5 steps

Tech stack

regexclapchrono