X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/9ae83685ae10ad4d0e6f6091413b1d2488eaf478..695023a09f7ed62d3a414dfc7c7b909fd0d1171b:/edumed/settings/logging.py?ds=inline diff --git a/edumed/settings/logging.py b/edumed/settings/logging.py new file mode 100644 index 0000000..ea3ad61 --- /dev/null +++ b/edumed/settings/logging.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# A sample logging configuration. The only tangible logging +# performed by this configuration is to send an email to +# the site admins on every HTTP 500 error when DEBUG=False. +# See http://docs.djangoproject.com/en/dev/topics/logging for +# more details on how to customize your logging configuration. +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + } + }, + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'filters': ['require_debug_false'], + 'class': 'django.utils.log.AdminEmailHandler' + } + }, + 'loggers': { + 'django.request': { + 'handlers': ['mail_admins'], + 'level': 'ERROR', + 'propagate': True, + }, + } +}