Installable Django app. Includes handlers to send logs to the Lumberjack server.
-
Install into project:
pip install git+https://github.com/edjchapman/django-lumberjack-client.git@1.0.0
-
Add "lumberjack" to your INSTALLED_APPS:
INSTALLED_APPS = [ ... 'lumberjack', ]
-
Point the Django exception mail_admins handler to the Lumberjack exception handler:
# https://docs.djangoproject.com/en/dev/topics/logging/#examples LOGGING = { 'handlers': { 'mail_admins': { 'level': 'ERROR', 'class': 'lumberjack.handlers.ExceptionHandler', }, }, }
-
Configure the destination and description for logs to be sent to the server in the main Django conf
LUMBERJACK_URL = 'https://lumberjack-server-url.com/api/' PROJECT_NAME = 'PROJECT_NAME' APPENV = 'PRODUCTION' APP_LOCATION = 'LONDON'
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
source venv/bin/activate
python -m run_tests
pip install --editable /path/to/django-lumberjack-client
- Increment version number in setup.py
- Commit and push changes.
- Create release on GitHub with the version number.
- The release can then be installed into Django projects like this:
git+https://github.com/edjchapman/django-lumberjack-client.git@{tag_or_branch}