[ python-Bugs-1501699 ] method format of logging.Formatter caches incorrectly

SourceForge.net noreply at sourceforge.net
Tue Jun 6 17:14:28 CEST 2006


Bugs item #1501699, was opened at 2006-06-06 17:14
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1501699&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Boris Lorbeer (blorbeer)
Assigned to: Nobody/Anonymous (nobody)
Summary: method format of logging.Formatter caches incorrectly

Initial Comment:
The format method of logging.Formatter is buggy in that
it doesn't call the method formatException if the cache
record.exc_text is set. If you have two Formatters that
should format the same log record differently (i.e. each
has its own overriding formatException method), the
formatException method of the second formatter will
never be called because the cache has been set by the
first formatter. The proper way of using the cache is
IMHO to check the cache only in the method
formatException of logging.Formatter.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1501699&group_id=5470


More information about the Python-bugs-list mailing list