Add Sentry logging

This commit is contained in:
Tom Price
2015-11-10 10:50:24 +00:00
parent 887e932c64
commit 2e1ab96186
3 changed files with 14 additions and 0 deletions

View File

@@ -50,9 +50,11 @@ INSTALLED_APPS = (
'reversion',
'captcha',
'widget_tweaks',
'raven.contrib.django.raven_compat',
)
MIDDLEWARE_CLASSES = (
'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',
'reversion.middleware.RevisionMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
@@ -129,6 +131,15 @@ LOGGING = {
}
}
import raven
RAVEN_CONFIG = {
'dsn': os.environ.get('RAVEN_DSN'),
# If you are using git, you can also automatically configure the
# release based on the git info.
'release': raven.fetch_git_sha(os.path.dirname(os.path.dirname(__file__))),
}
# User system
AUTH_USER_MODEL = 'RIGS.Profile'