Sentry django configuration - logger
<p>I am trying to use simple logging and want to send errors/exceptions to Sentry.</p>

<p>I configured the Sentry as per the document and run the test successfully on my dev(<code>python manage.py raven test</code>)</p>

<p>I added the Logging configuration as in <a href="https://docs.getsentry.com/hosted/clients/python/integrations/django/" rel="noreferrer">Sentry documentation</a> to a Django settings</p>

<p>When I put this code in my View, then it doesn't work at all</p>

<pre><code>import logging
logger = logging.getLogger(__name__)
logger.error('There was an error, with a stacktrace!', extra={
    'stack': True,
})
</code></pre>

<p>Maybe I am missing something </p>

<p>Thanks for the help</p>

<pre><code>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', # To capture more than ERROR, change to WARNING, INFO, etc.
            'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler',
            'tags': {'custom-tag': 'x'},
        },
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'verbose'
        }
    },
    'loggers': {
        'django.db.backends': {
            'level': 'ERROR',
            'handlers': ['console'],
            'propagate': False,
        },
        'raven': {
            'level': 'DEBUG',
            'handlers': ['console'],
            'propagate': False,
        },
        'sentry.errors': {
            'level': 'DEBUG',
            'handlers': ['console'],
            'propagate': False,
        },
    },
}
</code></pre>