Catch Exceptions in production
Project description
DJANGO EXCEPT CATCHER
django-except-catcher is a simple tool to catch and view exceptions in a production django website.
Exceptions are stored and listed so you can find similar errors and look their “yellow error page”, just like in django’s debug error page.
It does not require instalation of any daemon in order to work, just install a regular django module.
Inspired in django’s AdminMailHandler.
INSTALATION
Install django-except-catcher:
pip install django-except-catcher
Add to urls.py:
path('', include(('except_catcher.urls', 'except_catcher'), namespace="except_catcher"))
add to settings.py:
INSTALLED_APPS = [
...
'except_catcher',
]
LOGGING = {
...
'handlers': {
'error_catcher': {
'level': 'ERROR',
'class': 'except_catcher.handlers.CatchExceptionHandler',
},
...
'loggers': {
'django.request': {
'handlers': [ 'error_catcher'],
'level': 'ERROR',
'propagate': False,
},
}
}
run migrations:
./manage.py migrate except_catcher
Now go to url:
http://localhost:8000/errors/
You can purposely throw an exception in the url:
http://localhost:8000/test-exception/
Only the superuser have access to these reports.
Sure the UI is ugly. That’s ok since only sysadmins are supposed to see it anyway.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-except-catcher-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a17045185f3ab863e4937faa416998e440240c1e9445e7c34183354d860ef89c |
|
MD5 | 7c7f87b336a79c617fed08e273e20b3d |
|
BLAKE2b-256 | 999200d592f0b58ac2f1a0158ea895efeef690c6aa36cdb6654afd08eae1ec54 |