LogBlitz

LogBlitz is a CGI script to search through your (sys-)log files. It is written in Python 3, and aims to be a webbased alter ego of grep, zgrep, bzgrep, xzgrep, and so on. You can configure multiple directories that contain logfiles, and you can give each HTTP authenticated user an individual set of log directories. LogBlitz expects the webserver to place the name of an authenticated user in the environment variable REMOTE_USER.
LogBlitz does not interpret the log entries in any way, but sees them just as a bunch of text lines. No additional modules need to be installed as a default installation of Python 3.8 or 3.9 is sufficient. The webinterface uses JavaScript just for the moveable divider between the filetree and the logview area, and for toggling the display of line numbers.

Screenshots

Installation

WSGI

Starting with version 16, LogBlitz can be served by a WSGI server in addition to its CGI interface. If you use mod_wsgi, then you can build upon these configuration snippets for Apache:

WSGIDaemonProcess logblitz processes=1 display-name=logblitz threads=5 user=logblitz group=logblitz umask=0777 script-user=root inactivity-timeout=3600 cpu-time-limit=600 memory-limit=536870912 virtual-memory-limit=1073741824
WSGIScriptAlias /wsgi/ /usr/local/www/wsgi/
<Directory /usr/local/www/wsgi>
    WSGIProcessGroup default
    AllowOverride None
    Options None
    Require all granted
</Directory>

This assumes that you have created a local user account named logblitz, while the logblitz.py file is owned by root and placed in /usr/local/www/wsgi. If you plan to use the re2 a regex library, which is an extension written in C, then set WSGIApplicationGroup to %{GLOBAL}:

<Directory /usr/local/www/wsgi>
    ...
    WSGIApplicationGroup %{GLOBAL}
    ...
</Directory>

Releases

Source code