Airbrake exception logger for django
Project description
Django Airbrake provides a logging handler to push exceptions and other errors to airbrakeapp or other airbrake-compatible exception handler services (e.g. aTech Media’s Codebase). Django 1.3, 1.4 and 1.5 on Python 2.6, 2.7 are supported, while support Django 1.5 on Python 3.3 is experimental.
Installation
Installation with pip:
$ pip install django-airbrake
Add 'airbrake.handlers.AirbrakeHandler' as a logging handler:
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse' } }, 'handlers': { 'airbrake': { 'level': 'WARNING', 'class': 'airbrake.handlers.AirbrakeHandler', 'filters': ['require_debug_false'], 'api_key': '[your-api-key]', 'env_name': 'develop', } }, 'loggers': { 'django.request': { 'handlers': ['airbrake'], 'level': 'WARNING', 'propagate': True, }, } }
Settings
level (built-in setting) Change the level to 'ERROR' to disable logging of 404 error messages.
- api_key (required)
API key provided by the exception handler system.
- env_name (required)
Name of the environment (e.g. production, develop, testing)
- api_url
To use aTech Media’s Codebase exception system, provide an extra setting api_url with the value 'https://exceptions.codebasehq.com/notifier_api/v2/notices'.
- env_variables
List of environment variables that should be included in the error message, defaults to ['DJANGO_SETTINGS_MODULE'].
- meta_variables
List of request.META variables that should be included in the error message, defaults to ['HTTP_USER_AGENT', 'HTTP_COOKIE', 'REMOTE_ADDR', 'SERVER_NAME', 'SERVER_SOFTWARE'].
- timeout
Timeout in seconds to send the error report, defaults to 30 seconds.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-airbrake-0.3.0.tar.gz
.
File metadata
- Download URL: django-airbrake-0.3.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e45f0a99893364b1845f00d805a3e0aad8fcb1372aa039754df611f7aa658b4 |
|
MD5 | 9c71f97354535f49b3e90751e5a2d475 |
|
BLAKE2b-256 | 3d0567bbda5f6230e24f965d308f6f56bb7388fed3277cdf6f8187ad937f5736 |