Skip to content

Dinkarpai/log-file-analyzer-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python log analyzer for parsing errors, warnings, timestamps, and issue patterns.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages