Only email or Humbug on Django errors if the app is actually deployed

(imported from commit bf495eb3b0bab9a8fad7a4bc55476e7ec7e3c8d1)
This commit is contained in:
Zev Benjamin 2013-06-10 12:59:10 -04:00
parent 03b40d180c
commit 05d2fca93b

View File

@ -454,13 +454,16 @@ LOGGING = {
'nop': {
'()': 'zephyr.lib.logging_util.ReturnTrue',
},
'require_really_deployed': {
'()': 'zephyr.lib.logging_util.RequireReallyDeployed',
},
},
'handlers': {
'humbug_admins': {
'level': 'ERROR',
'class': 'zephyr.handlers.AdminHumbugHandler',
# For testing the handler delete the next line
'filters': ['HumbugLimiter', 'require_debug_false'],
'filters': ['HumbugLimiter', 'require_debug_false', 'require_really_deployed'],
'formatter': 'default'
},
'console': {
@ -485,7 +488,7 @@ LOGGING = {
'level': 'ERROR',
'class': 'zephyr.handlers.HumbugAdminEmailHandler',
# For testing the handler replace the filters list with just 'nop'
'filters': ['EmailLimiter', 'require_debug_false'],
'filters': ['EmailLimiter', 'require_debug_false', 'require_really_deployed'],
},
},
'loggers': {