[Zope-Checkins] Re: CVS: Packages/zLOG - EventLogger.py:1.8.6.4
Chris Withers
chris at simplistix.co.uk
Tue Aug 3 13:40:24 EDT 2004
*shrugs*
Have you looked at how traceback.print_stack is implemented?
Chris
Casey Duncan wrote:
> Sounds like something for the Python bug collector to me.
>
> -Casey
>
> On Tue, 03 Aug 2004 00:42:47 -0400
> Chris McDonough <chrism at plope.com> wrote:
>
>
>>This smells awfully funny:
>>
>>try:
>>
>> raise
>>
>>except:
>>
>> pass
>>
>>... ok, I read the collector issue. That's insane. It's code like
>>this that drives me nuts two years later, but I don't have a better
>>suggestion. ;-)
>>
>>- C
>>
>>On Mon, 2004-08-02 at 07:48, Andreas Jung wrote:
>>
>>>Update of /cvs-repository/Packages/zLOG
>>>In directory cvs.zope.org:/tmp/cvs-serv4004
>>>
>>>Modified Files:
>>> Tag: Zope-2_7-branch
>>> EventLogger.py
>>>Log Message:
>>>Collector #1234: an exception triple passed to LOG() was not
>>>propagated properly to the logging module of Python
>>>
>>>
>>>=== Packages/zLOG/EventLogger.py 1.8.6.3 => 1.8.6.4 ===
>>>--- Packages/zLOG/EventLogger.py:1.8.6.3 Fri Sep 19 17:16:49 2003
>>>+++ Packages/zLOG/EventLogger.py Mon Aug 2 07:48:33 2004
>>>@@ -52,6 +52,16 @@
>>> if detail:
>>> msg = "%s\n%s" % (msg, detail)
>>>
>>>+ # Since the logging module of Python does not allow to pass
>>>a+ # traceback triple, we need to fake the exception. (See
>>>also+ # Collector #1234).
>>>+
>>>+ if isinstance(error, tuple):
>>>+ try:
>>>+ raise error[0], error[1], error[2]
>>>+ except:
>>>+ pass
>>>+
>>> self.logger.log(level, msg, exc_info=(error is not None))
>>>
>>> event_logger = EventLogger()
>>>
>>>_______________________________________________
>>>Zope-Checkins maillist - Zope-Checkins at zope.org
>>>http://mail.zope.org/mailman/listinfo/zope-checkins
>>>
>>
>>_______________________________________________
>>Zope-Checkins maillist - Zope-Checkins at zope.org
>>http://mail.zope.org/mailman/listinfo/zope-checkins
>>
>
> _______________________________________________
> Zope-Checkins maillist - Zope-Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/zope-checkins
>
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope-Checkins
mailing list