Collect your error logs in any application. This is a Flask app and this is still being updated.
This guide is intended for development setup.
- Clone the repo
git clone https://github.com/ichux/elog.git
cd elog
- source bootstraps.sh then alter to taste, if need be.
- Create a virtual env and install dependencies
python3 -m venv .venv
. .venv/bin/activate # For linux, see bin/ for your system script
python -m pip install -r requirements.txt -r requirements-dev.txt
- If you encounter errors during the build of uwsgi, blinker, uwsgitop, pyperclip and wrapt, just overlook it.
- Run
pre-commit install
for you to be able to make use of .pre-commit-config.yaml
- Ports are quoted here, e.g. 9030. Please note that if you have changed such quoted ports in your
.env
file, remember to change it to taste where appropriate.
- Run the database migrations
python -m flask db migrate
python -m flask db upgrade
- Create a user
- Then run the development server with
python -m flask run # --port or --host to customize
Go to localhost:5000
(default port for Flask) to see you app live.
- Type
flask auth {username} {password}
. Do note that you have to replace anything within brackets with your values.
- To run unit tests,
pytest tests/unit
- To can e2e tests,
pytest test/e2e
. make sure to have Chrome browser installed. Or See SeleniumBase docs to adapt to your environment (e.g using Firefox, --browser=firefox).
The main part lives in the elog
subdirectory. Other folders and files are either config files or needed for the app to run, like logsdir
for storing the logs. Here is how the elog
is organized.
elog
├── advsearch.py
├── commands.py
├── config.py
├── controllers/ # Contains Flask app and Blueprints
├── errorhandlers.py
├── errortraps.py
├── forms/
├── helpers.py
├── __init__.py
├── models/
├── static/ # The minified version of static assets
├── static-generator/ # Contain code to generate static assets. See its README.
└── templates/ # Jinja templates for server-side rendering
6 directories, 7 files