;:9xddlmZddlZddlZddlmZddlmZmZm Z m Z ddl m Z ddl mZddlmZerddlmZdd lmZdd lmZdd lmZejZejZegd Zd ZGdde ZdZdZdZ e!dZ"dZ#Gddej$e%Z&e&Z'Gddej$e%Z(dS))absolute_importN)Hub) to_stringevent_from_exceptioncurrent_stacktracecapture_internal_exceptions) Integration) iteritems)MYPY) LogRecord)Any)Dict)Optional)zsentry_sdk.errorszurllib3.connectionpoolzurllib3.connectionc: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_LOGGERSadd)names /builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/integrations/logging.py ignore_loggerr&sc:eZdZdZeefdZdZedZ dS)LoggingIntegrationloggingcd|_d|_|t||_|t||_dSdS)N)level)_handler_breadcrumb_handlerBreadcrumbHandler EventHandler)selfr event_levels r__init__zLoggingIntegration.__init__7sN #'  '8u'E'E'ED $  "({;;;DMMM # "rc|j/|j|jjkr|j||j1|j|jjkr|j|dSdSdSN)rlevelnorhandlerr records r_handle_recordz!LoggingIntegration._handle_recordBsz = $4=;N)N)N M  ( ( (  $ 0$":"@@@  $ + +F 3 3 3 3 3 1 0@@rcVtjjfd}|tj_dS)NcT |||jtvr.sentry_patched_callhandlersRs ;''f55 ;&666"%+"="=>P"Q"QK".#226::::7.;&666"%+"="=>P"Q"QK".#226::::7.s AA B')rLogger callHandlers)r0r/s @r setup_oncezLoggingIntegration.setup_onceMs<#>6 ; ; ; ; ;'B###rN) __name__ __module__ __qualname__ identifier DEFAULT_LEVELDEFAULT_EVENT_LEVELr"r) staticmethodr3rrrr4sbJ*8K < < < < 4 4 4BB\BBBrrc|jtvSr$)rrr(s r _can_recordr>cs ;. ..rcdt|j|j|jtj|jt|dS)Nlog)tyrcategorymessage timestampdata)_logging_to_event_level levelnamerrCdatetimeutcfromtimestampcreated_extra_from_recordr=s r_breadcrumb_from_recordrLhsO()9::K>&77GG"6**   rczddi||S)Ncriticalfatal)getlower)rGs rrFrFts1  $ $Y__%6%6 8I8I J JJr)argsrJexc_infoexc_textfilenamefuncNamerGr%linennolinenorCmodulemsecsmsgrpathnameprocess processNamerelativeCreatedstacktagsthread threadName stack_infocNdtt|DS)Nci|];\}}|tvt|tr|d8||z&_extra_from_record..sZ    Aq ' ' 'As## (+,<<+<+< ( 1 ' ' 'r)r varsr=s rrKrKs1  d6ll++   rceZdZdZdZdZdS)rz A logging handler that emits Sentry events for each log record Note that you do not have to use this class if the logging integration is enabled, which it is by default. ct5||||cdddS#1swxYwYdSr$rformat_emitr's remitzEventHandler.emit ( * * & & KK   ::f%% & & & & & & & & & & & & & & & & & &*AA  A cnt|sdStj}|jdS|jj}|jr+|jdt |j|ddd\}}nb|jrW|jdJi}i}t5dt|dddd gi|d <dddn #1swxYwYni}i}||d <t|j |d <|j |d <t|j |jd|d<t||d<|||dS)NrrT)typehandled)client_options mechanismvalues with_localsF) stacktracecrashedr,threads log_recordrlogger)rCparamslogentryextrahint)r>rr,clientoptionsrSrrrrFrGrrr[rRrK capture_event)r r(hubr|eventrs rruzEventHandler._emits6""  Fk :  F+ ? vq1=.-#,>>KE44 _ !3!;ED,..  *< .} =++(-'+  $i                ED#\01ABBg +h(1&*(=(=UUj+F33g %d+++++s B77B;>B;Nr4r5r6__doc__rvrur;rrrrs< &&& 1,1,1,1,1,rrceZdZdZdZdZdS)rz A logging handler that records breadcrumbs for each log record. Note that you do not have to use this class if the logging integration is enabled, which it is by default. ct5||||cdddS#1swxYwYdSr$rsr's rrvzBreadcrumbHandler.emitrwrxct|sdStjt |d|idS)Nrr)r>rr,add_breadcrumbrLr's rruzBreadcrumbHandler._emitsR6""  F "" #F + +<2H #     rNrr;rrrrs< &&&      rr)) __future__rrrHsentry_sdk.hubrsentry_sdk.utilsrrrrsentry_sdk.integrationsr sentry_sdk._compatr sentry_sdk._typesr r typingr rrINFOr8ERRORr9setrrrr>rLrF frozensetrhrKHandlerobjectr SentryHandlerrr;rrrs3&&&&&& 0/////(((((("""""" !!!!!! m3III   ,B,B,B,B,B,B,B,B^///   KKK  i<>,>,>,>,>,7?F>,>,>,D           r