/log_processor

Parses Apache2 access logs and saves rows in sqlite3 DB for further reporting and processing

Primary LanguagePython

Description

Parses Apache2 access logs and saves rows in sqlite3 DB for further reporting and processing

Why?

This is a simple tool meant to be executed manually or as a cron job on a web server and extracting requests from Apache2 access log.

Example usage

Print extracted requests:

$ python3 log_processor.py -f "/var/log/apache2/access.log.1" -p 1

Save extracted requests in sqlite3 database:

$ python3 log_processor.py -f "/var/log/apache2/access.log.1" -s 1

Do the same with multiple files matching a given mask:

$ python3 log_processor.py -f "/var/log/apache2/access.log.*" -s 1