A django app for simulating exceptions and logging calls of various levels through http. Its perfect when you want to try out your LOGGING settings.
- Python 2.7+/3.5+
- Django 1.8+
pip install django-log-trigger
pip install git+git://github.com/marteinn/django-log-trigger.git@develop
-
Add
log_trigger
to installed appsINSTALLED_APPS = [ 'pages', 'pizza', ... 'log_trigger', ]
-
Add
log_trigger.urls
to yoururls.py
import log_trigger urlpatterns = [ url(r'^api/', include('api.urls')), url(r'^log-trigger/', include(log_trigger.urls)), ...
-
Done!
Open your browser and visit any of these urls.
/log-trigger/system-exception/
: Trigger system exception/log-trigger/unhandled-exception/
: Trigger unhandled exception/log-trigger/disallowed-host-exception/
: Trigger disallowed exception
/log-trigger/debug-logging/
: Debug logging/log-trigger/info-logging/
: Info logging/log-trigger/warn-logging/
: Warn logging/log-trigger/error-logging/
: Error logging/log-trigger/critical-logging/
: Critical logging
Default: log_trigger.views
The logger you want to use when testing the logging endpoints.
Default: Empty
Use the param if you want to secure your testing endpoints, the secret are passed along as a get variable. Example: /debug-logging/?secret=mysecret
Want to contribute? Awesome. Just send a pull request.
Django-Log-Trigger is released under the MIT License.