A Python Command line parser for common log format
![](https://www.deeplearningdaily.com/wp-content/uploads/2021/09/a-python-command-line-parser-for-common-log-format_614cfb0bbc481-375x210.jpeg)
Command line parser for common log format (Nginx default).
Usage
It counts most important data: referrers, operating systems, browsers and daily unique visitors (IPs).
# Console output
python parse.py sitename.log.gz
# HTML output
python parse.py sitename.log.gz --html ~/sitename/logs.html
Install and update PIP packages.
pip install -U -r requirements.txt
Speed
- logparser 24,249/s
- GoAccess 6,234/s
Outputs
- HTML output is based on Jinja2 templates. It can be improved as you see fit.
- Console output for Subreply for