Connect your Pylons project to GlitchTip

WSGI Middleware

A Pylons-specific middleware exists to enable easy configuration from settings:

from raven.contrib.pylons import Sentry

application = Sentry(application, config)

Configuration is handled via the sentry namespace:


Logger setup

Add the following lines to your project’s .ini file to setup SentryHandler:

keys = root, sentry

keys = console, sentry

keys = generic

level = INFO
handlers = console, sentry

level = WARN
handlers = console
qualname = sentry.errors
propagate = 0

class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

class = raven.handlers.logging.SentryHandler
args = ('SENTRY_DSN',)
level = NOTSET
formatter = generic

format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

You may want to set up other loggers as well.