o
    #Âif.  ã                   @   s†   d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ G dd	„ d	ejƒZd
d„ Zdd„ Zdd„ ZdS )é    N)Úutils)Ú_client_init_debug)ÚHub)ÚScope)Úlogger)Ú	LogRecordc                   @   s   e Zd Zdd„ ZdS )Ú_HubBasedClientFilterc                 C   s   t  d¡rdS t ¡ jd S )NFTÚdebug)r   Úgetr   Ú
get_clientÚoptions)ÚselfÚrecord© r   úI/var/www/html/corbot_env/lib/python3.10/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 jstƒ  tƒ  d S ©N)r   ÚhandlersÚconfigure_loggerÚconfigure_debug_hubr   r   r   r   Úinit_debug_support   s   
r   c                  C   sB   t  tj¡} |  t  d¡¡ t | ¡ t t j	¡ t 
tƒ ¡ d S )Nz$ [sentry] %(levelname)s: %(message)s)ÚloggingÚStreamHandlerÚsysÚstderrÚsetFormatterÚ	Formatterr   Ú
addHandlerÚsetLevelÚDEBUGÚ	addFilterr   )Ú_handlerr   r   r   r      s
   
r   c                  C   s   dd„ } | t _d S )Nc                   S   s   t jS r   )r   Úcurrentr   r   r   r   Ú_get_debug_hub'   s   z+configure_debug_hub.<locals>._get_debug_hub)r   r&   )r&   r   r   r   r   %   s   
r   )r   r   Ú
sentry_sdkr   Úsentry_sdk.clientr   Úsentry_sdk.hubr   Úsentry_sdk.scoper   Úsentry_sdk.utilsr   r   ÚFilterr   r   r   r   r   r   r   r   Ú<module>   s    		