diff --git a/app/conf/common.py b/app/conf/common.py
index 2e5fba1..f637807 100644
--- a/app/conf/common.py
+++ b/app/conf/common.py
@@ -34,6 +34,8 @@ MIDDLEWARE_CLASSES = [
'sso.middleware.InactiveLogoutMiddleware',
'sso.middleware.IGBMiddleware',
'sso.middleware.IPTrackingMiddleware',
+ 'raven.contrib.django.middleware.Sentry404CatchMiddleware',
+ 'raven.contrib.django.middleware.SentryResponseErrorIdMiddleware',
]
ROOT_URLCONF = 'urls'
@@ -62,6 +64,7 @@ INSTALLED_APPS = [
'django.contrib.sites',
'django.contrib.humanize',
'django.contrib.staticfiles',
+ 'raven.contrib.django',
'gargoyle',
'south',
'piston',
@@ -159,7 +162,7 @@ LOGGING = {
'disable_existing_loggers': False,
'root': {
'level': 'WARNING',
- 'handlers': ['console'],
+ 'handlers': ['sentry'],
},
'filters': {
'require_debug_false': {
@@ -172,24 +175,17 @@ LOGGING = {
},
},
'handlers': {
+ 'sentry':
+ 'level': 'ERROR',
+ 'class': 'raven.contrib.django.handlers.SentryHandler',
+ },
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose'
},
- 'mail_admins': {
- 'level': 'ERROR',
- 'class': 'django.utils.log.AdminEmailHandler',
- 'include_html': True,
- 'filters': ['require_debug_false'],
- }
},
'loggers': {
- 'django.request': {
- 'handlers': ['console'],
- 'level': 'ERROR',
- 'propagate': True,
- },
'django.db.backends': {
'level': 'ERROR',
'handlers': ['console'],
@@ -205,10 +201,5 @@ LOGGING = {
'handlers': ['console'],
'propagate': False,
},
- 'celery': {
- 'level': 'WARNING',
- 'handlers': ['console'],
- 'propagate': False,
- },
}
}
diff --git a/app/templates/500.html b/app/templates/500.html
index 04f2a6a..adffe8c 100644
--- a/app/templates/500.html
+++ b/app/templates/500.html
@@ -1,3 +1,6 @@
Oops, it seems the server got ganked, CONCORD have been informed.
+{% if request.sentry.id %} +Be helpful, drop a message to the TEST sysadmin guys with this ID: {{ request.sentry.id }}
+{% endif %} diff --git a/requirements.txt b/requirements.txt index 7dabaf5..0b10553 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,4 +18,4 @@ nexus gargoyle==0.9.0 -e hg+https://bitbucket.org/jespern/django-piston@7c90898072ce#egg=django_piston -e hg+https://bitbucket.org/ubernostrum/django-registration@27bccd108cde#egg=django-registration - +raven>=2.0.3