PHP 8.2.30
Preview: handlers.py Size: 1.01 KB
//proc/thread-self/root/opt/cloudlinux/venv/lib/python3.11/site-packages/raven/contrib/django/handlers.py

"""
raven.contrib.django.handlers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from __future__ import absolute_import

import logging

from raven.handlers.logging import SentryHandler as BaseSentryHandler
from raven.utils import memoize


class SentryHandler(BaseSentryHandler):
    def __init__(self, *args, **kwargs):
        # TODO(dcramer): we'd like to avoid this duplicate code, but we need
        # to currently defer loading client due to Django loading patterns.
        self.tags = kwargs.pop('tags', None)

        logging.Handler.__init__(self, level=kwargs.get('level', logging.NOTSET))

    @memoize
    def client(self):
        # Import must be lazy for deffered Django loading
        from raven.contrib.django.models import client
        return client

    def _emit(self, record):
        request = getattr(record, 'request', None)
        return super(SentryHandler, self)._emit(record, request=request)

Directory Contents

Dirs: 6 × Files: 11

Name Size Perms Modified Actions
celery DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
308 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
10.30 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
1.01 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
466 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
9.20 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
3.12 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
2.12 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
594 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
3.10 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
2.92 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
315 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).