settings.py: use raven django instead of just raven

This commit is contained in:
Jérôme Schneider 2014-03-26 12:00:46 +01:00
parent a0017056c1
commit dd86032ac2
1 changed files with 16 additions and 3 deletions

View File

@ -538,11 +538,24 @@ except ImportError, e:
pass
if RAVEN_CONFIG_DSN:
RAVEN_CONFIG = {
'dsn': RAVEN_CONFIG_DSN,
}
INSTALLED_APPS += ('raven.contrib.django.raven_compat', )
LOGGING['handlers']['sentry'] = {
'level': 'ERROR',
'class': 'raven.handlers.logging.SentryHandler',
'dsn': RAVEN_CONFIG_DSN,
}
'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler',
}
LOGGING['loggers']['raven'] = {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
}
LOGGING['loggers']['sentry.errors'] = {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
}
for logger in LOGGING['loggers'].values():
logger['handlers'].append('sentry')