Rust Log Analyzer
- Zhen Yu (NetID: zheny5)
- Carol Yin (NetID:carolry2)
We will develop a Rust-based Log Analyzer, a Command-Line Tool designed to help developers and system administrators analyze server logs (e.g., Nginx, Apache, or custom application logs) efficiently.
The goal is to extract valuable information from massive log files, such as:
- Most frequently visited URLs
- Error distribution (404, 500, etc.)
- Request response time statistics
- Top IP addresses
- Access trends over time (hourly/daily)
We chose this project because it combines Rust's strengths (performance, safe concurrency) with practical log analysis. It is both technically challenging and useful in real-world scenarios.
The project will consist of the following core components:
-
Log File Reader
- Support for reading
.log/.txtfiles. - CLI interface to specify the log file path.
- Stream large files line-by-line efficiently.
- Support for reading
-
Log Parser
- Parse logs using
regex. - Extract important fields: IP, timestamp, HTTP method, path, status code, response time.
- Parse logs using
-
Data Analyzer
- Calculate statistics:
- Most accessed URLs
- Status code distribution
- Average response time
- Top IP addresses
- Use
polarsfor data processing. - Use
rayonfor parallel processing to speed up analysis of large logs.
- Calculate statistics:
-
CLI Output
- Present results in a clear and user-friendly format.
- Display statistics directly in the terminal.
-
(Optional) Visualization
- Use
plotly-rsto generate charts. - Export graphs as HTML or PNG.
- Use
| Date | Goal |
|---|---|
| Checkpoint 1 | Implement log file reading, parsing, and basic statistics (URL counts, status code distribution, IP ranking). |
| Checkpoint 2 | Add multi-threading with rayon for performance improvements, refine CLI output formatting, and add optional visualization (charts). |
- Learning to use
polarsandrayoneffectively. - Handling very large log files efficiently.
- Designing a clean and user-friendly CLI interface.
- (Optional) Learning
plotly-rsfor visualization.