Disclaimer: You are looking at a post I wrote some time ago. The information and opinions contained within may be outdated and may differ from my current views. Please proceed accordingly.

Python Module for Reading Apache Logs

Dec 05, 2003 2:16 PM
Tags:

zephyrfalcon has developed antilog, a Python module for parsing Apache log files.

# how many "400" errors have we gotten recently?
>>> import antilog
>>> reflog = antilog.RefLogReader('access.log')
>>> invalid = [e for e in reflog.data if e.return_code.startswith('4')]
>>> len(invalid)
175

This blog is no longer active, and comments have been disabled.