Commit 95dd2aad by Carson Gee

Merge pull request #3836 from mitocw/cg/add_default_logging

Adding django default log handlers into logging configuration
parents 57ec4024 cc083275
......@@ -67,6 +67,11 @@ def get_logger_config(log_dir,
'syslog_format': {'format': syslog_format},
'raw': {'format': '%(message)s'},
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse',
}
},
'handlers': {
'console': {
'level': console_loglevel,
......@@ -74,6 +79,11 @@ def get_logger_config(log_dir,
'formatter': 'standard',
'stream': sys.stderr,
},
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'syslogger-remote': {
'level': 'INFO',
'class': 'logging.handlers.SysLogHandler',
......@@ -97,6 +107,11 @@ def get_logger_config(log_dir,
'level': 'DEBUG',
'propagate': False
},
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment