-
-
Save lacoski/1ec6f839a300d4a75c12608cd7ede335 to your computer and use it in GitHub Desktop.
Production raven config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSTALLED_APPS += ( | |
'raven.contrib.django.raven_compat', | |
) | |
MIDDLEWARE_CLASSES += ( | |
'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware', | |
) | |
RAVEN_CONFIG = { | |
'dsn': 'http://x:y@sentry.domain.com/2', # NOQA | |
} | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'root': { | |
'level': 'WARNING', | |
'handlers': ['sentry'], | |
}, | |
'formatters': { | |
'verbose': { | |
'format': ('%(levelname)s %(asctime)s %(module)s %(process)d ' | |
'%(thread)d %(message)s') | |
}, | |
}, | |
'handlers': { | |
'sentry': { | |
'level': 'ERROR', | |
'class': ('raven.contrib.django.raven_compat.handlers.' | |
'SentryHandler'), | |
}, | |
}, | |
'loggers': { | |
'payonline': { | |
'level': 'ERROR', | |
'handlers': ['sentry'], | |
'propagate': False | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logger = logging.getLogger('payonline') | |
logger.error('PayOnline: {}'.format(u"Connection error"), extra=self._extra_logging_params()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment