X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/891a1e056e6066b28e000df16d69b21946338a57..40d4547a5c9eb12079306c0d683a77d183e8588d:/prawokultury/settings.d/40-logging.conf diff --git a/prawokultury/settings.d/40-logging.conf b/prawokultury/settings.d/40-logging.conf new file mode 100755 index 0000000..3d91c9c --- /dev/null +++ b/prawokultury/settings.d/40-logging.conf @@ -0,0 +1,28 @@ +# 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, + }, + } +}