settings: add sentry support
This commit is contained in:
parent
e1d05a4871
commit
dacc8691dc
|
@ -386,6 +386,9 @@ LOGGING = {
|
||||||
}
|
}
|
||||||
SOUTH_TESTS_MIGRATE = False
|
SOUTH_TESTS_MIGRATE = False
|
||||||
|
|
||||||
|
# Raven DSN
|
||||||
|
RAVEN_CONFIG_DSN = os.environ.get('RAVEN_CONFIG_DSN')
|
||||||
|
|
||||||
# Admin tools
|
# Admin tools
|
||||||
ADMIN_TOOLS_INDEX_DASHBOARD = 'portail_citoyen.dashboard.CustomIndexDashboard'
|
ADMIN_TOOLS_INDEX_DASHBOARD = 'portail_citoyen.dashboard.CustomIndexDashboard'
|
||||||
ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'portail_citoyen.dashboard.CustomAppIndexDashboard'
|
ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'portail_citoyen.dashboard.CustomAppIndexDashboard'
|
||||||
|
@ -476,3 +479,23 @@ if IDP_OPENID:
|
||||||
if IDP_CAS:
|
if IDP_CAS:
|
||||||
INSTALLED_APPS += ('authentic2.idp.idp_cas',)
|
INSTALLED_APPS += ('authentic2.idp.idp_cas',)
|
||||||
|
|
||||||
|
if RAVEN_CONFIG_DSN:
|
||||||
|
RAVEN_CONFIG = {
|
||||||
|
'dsn': RAVEN_CONFIG_DSN,
|
||||||
|
}
|
||||||
|
INSTALLED_APPS += ('raven.contrib.django.raven_compat', )
|
||||||
|
LOGGING['handlers']['sentry'] = {
|
||||||
|
'level': 'ERROR',
|
||||||
|
'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,
|
||||||
|
}
|
||||||
|
LOGGING['loggers']['']['handlers'].append('sentry')
|
||||||
|
|
Reference in New Issue