Intergration to the Django Standard Logging system

Issue #17 resolved
Former user created an issue

Our deployments use sentry for logging purposes and we'd like to be able to send our dogslow reports there too! Sentry even handles the emails in a centralised place.

Comments (2)

  1. Erik van Zijst repo owner

    We do the same for bitbucket. Make sure you run version 0.9.5 or later and then just configure logging in your Django settings.py:

    DOGSLOW_LOGGER = 'dogslow' # can be anything, but must match `logger` below
    DOGSLOW_LOG_TO_SENTRY = True
    
    DOGSLOW_LOG_LEVEL = 'WARNING' # optional, defaults to 'WARNING'
    
    # Add a new sentry handler to handle WARNINGs. It's not recommended to
    # modify the existing sentry handler, as you'll probably start seeing
    # other warnings unnecessarily sent to Sentry.
    LOGGING = {
        ...
        'handlers': {
            ...
            'dogslow': {
                'level': 'WARNING',
                'class': 'raven.contrib.django.handlers.SentryHandler',
            }
            ...
        }
        'loggers': {
            ...
            'dogslow': {
                'level': 'WARNING',
                'handlers': ['dogslow'], # or whatever you named your handler
            }
            ...
        }
        ...
    }
    
  2. Log in to comment