}™PdZddlmZddlmZmZmZddlmZddl m Z ddl Z ddl m Z ddlmZe jeZGd d e ZGd d eZdS) z raven.contrib.zope ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. )absolute_import)getouterframes currentframegetinnerframes) SentryHandler)FactoryN)nobody)iter_stack_framesc eZdZdZdZdZdS)ZopeSentryHandlerFactoryc|jjSN)sectionlevelselfs m/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/raven/contrib/zope/__init__.pygetLevelz!ZopeSentryHandlerFactory.getLevels |!!c.tdi|jjS)N)ZopeSentryHandlerr__dict__rs rcreatezZopeSentryHandlerFactory.creates 994<#8999rc<tj|||_dSr)r__init__r)rrs rrz!ZopeSentryHandlerFactory.__init__s rN)__name__ __module__ __qualname__rrrrrrr r sA""":::rr c2eZdZdZfdZdZfdZxZS)rz Zope unfortunately eats the stack trace information. To get the stack trace information and other useful information from the request object, this class looks into the different stack frames when the emit method is invoked. ctt|j|i||dtj}||dS)Nr)superrrgetloggingERRORsetLevel)rargskwr __class__s rrzZopeSentryHandler.__init__*sS/&&/<<<<w .. ercN|jdkp|jd S)Nraven)z sentry.errorszraven.)name startswith)rrecords r can_recordzZopeSentryHandler.can_record/s0 K7 " C{%%&ABB  rc |jtjkr||rd}d}t t D]}|d}|s]|jdd}|s@|jdd} t|dd}n#t$rd}YnwxYw|s-|jdd}t|dsd}|r|rn|r.||_ tt|d|_|r |j}|jd|j}|j|t'|j||j|jdd| } d | d vr!d | d vr| d d | d d <d | d vr| d d | d<t/|d| |dd} | 8| t0kr-| | dpdd} ni} t/|d| n3#t6t8f$rt:ddYnwxYwt?t@|!|S)Nrrequestrexc_info __getitem__ REMOTE_ADDR)headersurlmethodhostdataHTTP_USER_AGENTr7z User-Agent QUERY_STRING query_stringAUTHENTICATED_USERemail)idr@userz#Could not extract data from requestT)r2)"levelnor$r%r/rrf_localsr#getattr RuntimeErrorhasattrr2r rstackstdintellseekreaddictenvirongetURLr9setattrr getId getPropertyAttributeErrorKeyErrorloggerwarningr"remit) rr.r1r2 frame_infoframeviewbody_posbodyhttprB user_dictr)s rrWzZopeSentryHandler.emit5s) >W] * *tv/F/F *GH,\^^<<   "1 +#n00DAAG"+$~11&$??+&-dIt&D&DGG++++&*GGG+($~11*dCCH"8];;(#'xE C"*%nXa[&A&ABB  YY&}1133HM&&q)))"=--//DM&&x000$+NN$4$4'.~%,_%8%8 "&$&$*. 000D )DO;;'tI>> $Y0A B!OL9%i88/3I~/N^,FIt444";;';TBBD'DFNN"&**,,%)%5%5g%>%>%D"%% %' FFI6666&1YYYNN#HSWNXXXXXY&--226:::s%B$$ B32B3 E)J -J:9J:)rrr__doc__rr/rW __classcell__)r)s@rrr"sj    6;6;6;6;6;6;6;6;6;rr)r_ __future__rinspectrrrraven.handlers.loggingr!ZConfig.components.logger.factoryrr$AccessControl.usersr raven.utils.stacksr getLoggerrrUr rrrrrhs '&&&&&@@@@@@@@@@000000555555&&&&&&000000  8 $ $     w   I;I;I;I;I; I;I;I;I;I;r