관리-도구
편집 파일: debug.cpython-37.opt-1.pyc
B T al � @ sz d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm Z d dlm Z G dd� dej�Zd d � Z dd� Zd d� ZdS )� N)�utils)�Hub)�logger)�_client_init_debug)� LogRecordc @ s e Zd Zdd� ZdS )�_HubBasedClientFilterc C s6 t �d�rdS tj}|d k r2|jd k r2|jjd S dS )NFT�debug)r �getr �currentZclient�options)�self�recordZhub� r �A/opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/debug.py�filter s z_HubBasedClientFilter.filterN)�__name__� __module__�__qualname__r r r r r r s r c C s t jst� t� d S )N)r Zhandlers�configure_logger�configure_debug_hubr r r r �init_debug_support s r c C sB t �tj�} | �t �d�� t�| � t�t j � t� t� � d S )Nz$ [sentry] %(levelname)s: %(message)s)�loggingZ StreamHandler�sys�stderrZsetFormatter� Formatterr Z addHandlerZsetLevel�DEBUGZ addFilterr )Z_handlerr r r r s r c C s dd� } | t _d S )Nc S s t jS )N)r r r r r r �_get_debug_hub( s z+configure_debug_hub.<locals>._get_debug_hub)r r )r r r r r &