Admin watchdog is a simple Django app to register and view logs in the django admin backoffice.
Tested with Django 2.2 through 4.0.
- Add "admin_watchdog" to your INSTALLED_APPS settings.
- Run python manage.py migrate to create the admin watchdog model.
Edit your LOGGING settings to use the admin watchdog handler. For example, to replace the default mail handler:
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'admin_watchdog': { 'level': 'ERROR', 'class': 'admin_watchdog.handlers.AdminWatchdogHandler', } }, 'loggers': { 'django.request': { 'handlers': ['admin_watchdog'], 'level': 'ERROR', 'propagate': False, } } }
- Your error logs will now be registered. Visit your admin backoffice to see the log entries.
- You can run the tests by doing make test.
- Yann FOUILLAT (alias Gagaro) <yann.fouillat@makina-corpus.com>
- GPLv3+