Add sentry and fabfile

This commit is contained in:
Nikolai R Kristiansen committed 2018-03-17 13:59:04 +01:00
1 parent cd11bd580b
commit 90eae21bc7
4 files changed
+101 -6

No files matched your search

+47 -4
View File
@@ -73,7 +73,7 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = 'bbssite.urls'
INSTALLED_APPS = (
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -87,10 +87,11 @@ INSTALLED_APPS = (
'django_extensions',
'rest_framework',
'easy_thumbnails',
)
LOCAL_APPS = (
'raven.contrib.django.raven_compat',
]
LOCAL_APPS = [
'main',
)
]
INSTALLED_APPS += LOCAL_APPS
LOGIN_REDIRECT_URL = '/'
@@ -108,6 +109,48 @@ THUMBNAIL_ALIASES = {
},
}
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'root': {
'level': 'INFO',
'handlers': ['console', 'sentry'],
},
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
},
'handlers': {
'sentry': {
'level': 'WARNING',
'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler',
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose'
}
},
'loggers': {
'django.db.backends': {
'level': 'ERROR',
'handlers': ['console'],
'propagate': False,
},
'raven': {
'level': 'WARNING',
'handlers': ['console'],
'propagate': False,
},
'sentry.errors': {
'level': 'WARNING',
'handlers': ['console'],
'propagate': False,
},
},
}
try:
from .local_settings import *
except ImportError:
+3 -1
View File
@@ -1,6 +1,8 @@
import os
from django.core.wsgi import get_wsgi_application
from raven.contrib.django.middleware.wsgi import Sentry
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bbssite.settings')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
application = Sentry(application)