https://github.com/moonrollersoft/log-viewer
Expose your log files
https://github.com/moonrollersoft/log-viewer
flask log log-viewer logging logs python show tail view
Last synced: about 1 year ago
JSON representation
Expose your log files
- Host: GitHub
- URL: https://github.com/moonrollersoft/log-viewer
- Owner: moonrollersoft
- License: mit
- Created: 2020-03-16T19:06:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T20:14:22.000Z (about 3 years ago)
- Last Synced: 2025-03-17T07:38:01.040Z (over 1 year ago)
- Topics: flask, log, log-viewer, logging, logs, python, show, tail, view
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# log-viewer: log web-exposer toolkit
## What is log-viewer for? ##
**log-viewer** is just a lightweight Python package that web-exposes your log files using
[Flask's](https://palletsprojects.com/p/flask/) interface.
## How do I get set up? ##
## Requisites ##
* [python](https://www.python.org/downloads/release/python-360/) >= 3.6 running on a
Linux environment.
## Where to get it ##
[PyPi](https://pypi.org/) repository, execute:
```sh
pip install log-viewer
```
## Installation from sources ##
Cloning the git [repo](https://github.com/moonrollersoft/log-viewer), execute in root folder:
```sh
python setup.py install
```
## Use ##
After package installation, execute:
```sh
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.
## 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/"
### Example ###
The following example will activate the login mode with custom parameters:
```sh
log-viewer -u admin -psw admin -p 8080 -lp "/var/log/django;/var/log/apt" -a "127.0.0.1"
```
## License
[MIT](LICENSE.txt)
## Dependencies
- [Flask](https://palletsprojects.com/p/flask/) >= 1*
## Contact ##
[moonrollersoft@gmail.com](mailto:moonrollersoft@gmail.com)