/opt/cloudlinux/venv/lib/python3.11/site-packages/sentry_sdk
import sys import logging from sentry_sdk import utils from sentry_sdk.hub import Hub from sentry_sdk.utils import logger from sentry_sdk.client import _client_init_debug from logging import LogRecord class _HubBasedClientFilter(logging.Filter): def filter(self, record): # type: (LogRecord) -> bool if _client_init_debug.get(False): return True hub = Hub.current if hub is not None and hub.client is not None: return hub.client.options["debug"] return False def init_debug_support(): # type: () -> None if not logger.handlers: configure_logger() configure_debug_hub() def configure_logger(): # type: () -> None _handler = logging.StreamHandler(sys.stderr) _handler.setFormatter(logging.Formatter(" [sentry] %(levelname)s: %(message)s")) logger.addHandler(_handler) logger.setLevel(logging.DEBUG) logger.addFilter(_HubBasedClientFilter()) def configure_debug_hub(): # type: () -> None def _get_debug_hub(): # type: () -> Hub return Hub.current utils._get_debug_hub = _get_debug_hub
.
Edit
..
Edit
__init__.py
Edit
__pycache__
Edit
_compat.py
Edit
_functools.py
Edit
_lru_cache.py
Edit
_queue.py
Edit
_types.py
Edit
_werkzeug.py
Edit
api.py
Edit
attachments.py
Edit
client.py
Edit
consts.py
Edit
crons
Edit
debug.py
Edit
envelope.py
Edit
hub.py
Edit
integrations
Edit
monitor.py
Edit
profiler.py
Edit
py.typed
Edit
scope.py
Edit
scrubber.py
Edit
serializer.py
Edit
session.py
Edit
sessions.py
Edit
tracing.py
Edit
tracing_utils.py
Edit
tracing_utils_py2.py
Edit
tracing_utils_py3.py
Edit
transport.py
Edit
utils.py
Edit
worker.py
Edit