Skip to content

Instantly share code, notes, and snippets.

@beniwohli
Created August 26, 2011 09:04
Show Gist options
  • Save beniwohli/1173019 to your computer and use it in GitHub Desktop.
Save beniwohli/1173019 to your computer and use it in GitHub Desktop.
Sentry Example Config
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {
'null': {
'level':'DEBUG',
'class':'django.utils.log.NullHandler',
},
'console':{
'level':'DEBUG',
'class':'logging.StreamHandler',
'formatter': 'simple'
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
},
'sentry': {
'level': 'ERROR',
'class': 'sentry.client.handlers.SentryHandler',
'formatter': 'verbose'
},
},
'loggers': {
'django': {
'handlers':['null', 'sentry'],
'propagate': True,
'level':'INFO',
},
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': False,
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment