AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/raven/contrib/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/raven/contrib/__pycache__/sanic.cpython-311.pyc |
� �܋f� � �� � d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl m Z ddlmZ ddl mZ dd lmZ ej � � Ze� d � � Zdd�Z G d� d e� � ZdS )z� raven.contrib.sanic ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2018 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. � )�absolute_importN)� setup_logging)�Client)� SentryHandler)�urlparse)� to_unicode)�convert_options�logging_configuredc � � | di t |j |t |j � dg � � � � t |j g� � z d|id��� � ��S )N�SENTRY_INCLUDE_PATHS�app)�dsn� include_paths�extra)�defaults� )r �config�set�get�name)� client_clsr r s �d/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/raven/contrib/sanic.py�make_clientr s~ � ��:� � � ��J���� ���'=�r�B�B�C�C��3�8�*�o�o�&� �3�� � � � � �� � � c � � e Zd ZdZdedddej fd�Zd� Zd� Z d� Z d� Zd � Zd � Z dd�Zd� Zd � Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�Sentryaj Sanic application for Sentry. Look up configuration from ``os.environ['SENTRY_DSN']``:: >>> sentry = Sentry(app) Pass an arbitrary DSN:: >>> sentry = Sentry(app, dsn='http://public:secret@example.com/1') Pass an explicit client:: >>> sentry = Sentry(app, client=client) Automatically configure logging:: >>> sentry = Sentry(app, logging=True, level=logging.ERROR) Capture an exception:: >>> try: >>> 1 / 0 >>> except ZeroDivisionError: >>> sentry.captureException() Capture a message:: >>> sentry.captureMessage('hello, world!') NFc �� � |r$t |t � � st d� � �|| _ || _ || _ || _ || _ || _ | � |� � d S )Nz&client should be an instance of Client) � isinstancer � TypeError�clientr r �logging�logging_exclusions�level�init_app)�selfr r r r r! r"