관리-도구
편집 파일: logging.cpython-38.pyc
U �Mgf% � @ s< d dl Z d dlmZmZ d dlmZ d dlZd dlmZmZmZm Z d dl mZ d dlm Z e r�d dlmZ d dl mZ d d lmZ d d lmZ d dlmZ e jZe jZe jde jd e jde jde jde jde jde jdiZedddg�Z dd� Z!G dd� de�Z"G dd� de j#�Z$G dd� de$�Z%e%Z&G dd� de$�Z'dS )� N)�datetime�timezone)�fnmatch)� to_string�event_from_exception�current_stacktrace�capture_internal_exceptions)�Integration)� TYPE_CHECKING)�MutableMapping)� LogRecord)�Any)�Dict)�OptionalZnotset�debug�info�warning�error�fatalzsentry_sdk.errorszurllib3.connectionpoolzurllib3.connectionc C s t �| � dS )a| This disables recording (both in breadcrumbs and as events) calls to a logger of a specific name. Among other uses, many of our integrations use this to prevent their actions being recorded as breadcrumbs. Exposed to users as a way to quiet spammy loggers. :param name: The name of the logger to ignore (same string you would pass to ``logging.getLogger``). N)�_IGNORED_LOGGERS�add)�name� r �M/opt/hc_python/lib/python3.8/site-packages/sentry_sdk/integrations/logging.py� ignore_logger/ s r c @ s2 e Zd ZdZeefdd�Zdd� Zedd� �Z dS ) �LoggingIntegration�loggingc C s8 d | _ d | _|d k r t|d�| _|d k r4t|d�| _ d S )N)�level)�_handler�_breadcrumb_handler�BreadcrumbHandler�EventHandler)�selfr Zevent_levelr r r �__init__@ s zLoggingIntegration.__init__c C sL | j d k r$|j| j jkr$| j �|� | jd k rH|j| jjkrH| j�|� d S �N)r �levelnor �handler �r"