| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A command-line tool for parsing and visualizing log files. Quickly summarize log levels, view colorized output, or filter for errors — all from the terminal.
Output is color-coded using colorama:
| Log Level | Color |
|---|---|
| INFO | Green |
| WARNING | Yellow |
| ERROR | Red |
Install the dependency with:
pip install colorama| File | Purpose |
|---|---|
| main.py | CLI entry point — parses arguments and runs commands |
| analyzer.py | Core logic — reads a log file and counts log level occurrences |
python main.py <command> <file>Counts and displays a summary of each log level found in the file.
python main.py analyze path/to/logfile.logExample output:
Log Summary: INFO: 42 WARNING: 7 ERROR: 3
Prints the entire log file with each line color-coded by its log level. Lines with no recognized level are printed in the default terminal color.
python main.py view path/to/logfile.logFilters the log file and prints only lines containing ERROR.
python main.py errors path/to/logfile.logThe tool detects log levels by scanning each line for the keywords INFO, WARNING, or ERROR. It is compatible with common log formats such as:
2024-01-15 10:23:01 INFO Application started 2024-01-15 10:23:45 WARNING Disk usage above 80% 2024-01-15 10:24:12 ERROR Failed to connect to database
No specific format is enforced — any line containing one of the three keywords will be recognized.
| Back | FazBrowse Home | New Git URL |