Skip to content

Commit

Permalink
[bug 750235] Add sentry handler to log_settings.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlr committed Nov 30, 2012
1 parent be30b82 commit 11c230b
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions log_settings.py
Expand Up @@ -9,6 +9,10 @@
config = {
'version': 1,
'disable_existing_loggers': True,
'root': {
'level': logging.ERROR,
'handlers': ['syslog', 'mail_admins', 'sentry'],
},
'formatters': {
'default': {
'format': '{0}: %(asctime)s %(name)s:%(levelname)s %(message)s: '
Expand All @@ -26,6 +30,10 @@
'class': 'django.utils.log.AdminEmailHandler',
'level': logging.ERROR,
},
'sentry': {
'class': 'raven.contrib.django.handlers.SentryHandler',
'level': logging.ERROR,
},
'console': {
'class': 'logging.StreamHandler',
'formatter': 'default',
Expand All @@ -34,17 +42,27 @@
},
'loggers': {
'k': {
'handlers': ['syslog', 'mail_admins'],
'handlers': ['syslog', 'mail_admins', 'sentry'],
'propogate': True,
# Use the most permissive setting. It is filtered in the handlers.
'level': logging.DEBUG,
},
'django.request': {
'handlers': ['syslog', 'mail_admins'],
'handlers': ['syslog', 'mail_admins', 'sentry'],
'propogate': True,
# Use the most permissive setting. It is filtered in the handlers.
'level': logging.DEBUG,
},
'raven': {
'level': logging.ERROR,
'handlers': ['syslog', 'mail_admins'],
'propagate': False,
},
'sentry.errors': {
'level': logging.ERROR,
'handlers': ['syslog', 'mail_admins'],
'propagate': False,
},
},
}

Expand Down

0 comments on commit 11c230b

Please sign in to comment.