Yc@@sdZddlmZddlmZmZmZddlmZddl m Z ddl Z ddl m Z ddlmZe jeZd e fd YZd efd YZdS( s raven.contrib.zope ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. i(tabsolute_import(tgetouterframest currentframetgetinnerframes(t SentryHandler(tFactoryN(tnobody(titer_stack_framestZopeSentryHandlerFactorycB@s#eZdZdZdZRS(cC@s |jjS(N(tsectiontlevel(tself((sL/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/zope/__init__.pytgetLevelscC@st|jjS(N(tZopeSentryHandlerR t__dict__(R ((sL/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/zope/__init__.pytcreatescC@stj|||_dS(N(Rt__init__R (R R ((sL/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/zope/__init__.pyRs (t__name__t __module__R RR(((sL/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/zope/__init__.pyRs  R cB@s)eZdZdZdZdZRS(s 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. cO@s?tt|j|||jdtj}|j|dS(NR (tsuperR RtgettloggingtERRORtsetLevel(R targstkwR ((sL/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/zope/__init__.pyR*scC@s |jdkp|jjd S(Ntravens sentry.errorssraven.(s sentry.errorssraven.(tnamet startswith(R trecord((sL/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/zope/__init__.pyt can_record/sc C@s|jtjkr|j|rd}d}xttD]}|d}|s|jjdd}|s|jjdd}yt |dd}Wqt k rd}qXqn|s|jjdd}t |dsd}qn|r=|r=Pq=q=W|r.||_ t t|d|_n|rya|jj}|jjd|jj}|jj|td|jd|jd |jd |jjd d d |} d| dkrd| dkr| dd| dds