Skip to content

Latest commit

 

History

History
76 lines (60 loc) · 1.4 KB

File metadata and controls

76 lines (60 loc) · 1.4 KB

Log File Analyzer

A Python mini project that analyzes application log files and generates a summary report.

Features

  • Counts INFO, WARNING, and ERROR log entries
  • Identifies the most frequent error messages
  • Exports results to a CSV summary file

Tech Stack

  • Python
  • Regular Expressions
  • CSV

Project Structure

  • analyzer.py - main Python script
  • sample.log - sample input log file
  • output/log_summary.csv - generated summary report
  • README.md - project documentation

How to Run

python3 analyzer.py
Sample Output
Log Analysis Summary
--------------------
INFO count: 4
WARNING count: 2
ERROR count: 3

Top Errors:
Database connection failed -> 2
API timeout occurred -> 1

Summary saved to output/log_summary.csv
Future Improvements
Add date filtering
Accept custom log file input
Build a Streamlit web interface
Export JSON report

Then:
1. save the file
2. in Terminal run:

```bash
git add README.md
git commit -m "Improve README formatting"
git push

##Sample Output
Log Analysis Summary
--------------------
INFO count: 4
WARNING count: 2
ERROR count: 3

Top Errors:
Database connection failed -> 2
API timeout occurred -> 1

Summary saved to output/log_summary.csv

##Future Improvements
Add date filtering
Accept custom log file input
Build a Streamlit web interface
Export JSON report

Then save, and run:

```bash
git add README.md
git commit -m "Improve README formatting"
git push