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
- 01
Parse log lines with regex
~2hWrite a regex pattern to extract IP, timestamp, request path, status code, and size from each log line.
- 02
Model parsed entries
~1.5hDefine a LogEntry struct and parse timestamps into chrono DateTime values, skipping malformed lines with a warning.
- 03
Aggregate statistics
~2hCompute top requesting IPs, status code distribution, and most-requested paths using HashMaps.
- 04
Report requests per hour
~1.5hBucket requests by hour using the parsed timestamps and print a simple text histogram.
- 05
Add CLI filtering options
~1.5hAdd flags to filter by date range or status code before aggregation.
Resources
- DocsThe Rust Book
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack