log-viewer is just a lightweight Python package that web-exposes your log files using Flask's interface.
- python >= 3.6 running on a Linux environment.
PyPi repository, execute:
pip install log-viewer
Cloning the git repo, execute in root folder:
python setup.py install
After package installation, execute:
log-viewer
log-viewer will search log files and it will expose them within HTML native accordions in http://0.0.0.0:8081 (default)
No login is needed by default. In order to activate the login, just set user or password through the execution options.
log-viewer execution options:
- -a --address Logs exposing address. Default: "0.0.0.0"
- -p --port Logs exposing port. Default: 8081
- -u --user User for login, it activates the login mode. If no password is set, the login mode will only check the provided user
- -psw --password Password for login, it activates the login mode. If no user is set, the login mode will only check the provided password
- -lp --logPaths Paths to search (recursively) the logs from (";" separated). Default: "/var/log/"
The following example will activate the login mode with custom parameters:
log-viewer -u admin -psw admin -p 8080 -lp "/var/log/django;/var/log/apt" -a "127.0.0.1"
- Flask >= 1*