[ python-Bugs-1669498 ] 2.4.4 Logging LogRecord attributes broken

SourceForge.net noreply at sourceforge.net
Mon Mar 5 05:27:40 CET 2007


Bugs item #1669498, was opened at 2007-02-26 15:18
Message generated for change (Settings changed) made by murrayg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1669498&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: Python 2.4
>Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Glenn Murray (murrayg)
Assigned to: Vinay Sajip (vsajip)
Summary: 2.4.4 Logging LogRecord attributes broken

Initial Comment:
The following module gives different results under 2.4.3 and 2.4.4
(running on Kubuntu, Dapper and Edgy releases, resp.) 

#!/usr/bin/env python
import logging

logger = logging.getLogger("MyLogger")
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
format = "%(levelname)-8s %(module)s %(lineno)d %(message)s"
handler.setFormatter(logging.Formatter(format))
logger.addHandler(handler)

logger.info("Yo")


On 2.4.3 I get
INFO     tmplogger 11 Yo

On 2.4.4 I get
INFO     __init__ 1072 Yo


The versions are 

Python 2.4.3 (#2, Oct  6 2006, 07:52:30)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2

and

Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2


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

>Comment By: Glenn Murray (murrayg)
Date: 2007-03-04 21:27

Message:
Logged In: YES 
user_id=584266
Originator: YES

Hi Vinay,

Good call, recompiling the /usr/lib/python2.4/logging/*.pyc files
fixed the problem.

Thanks,
Glenn

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

Comment By: Vinay Sajip (vsajip)
Date: 2007-02-28 14:15

Message:
Logged In: YES 
user_id=308438
Originator: NO

Can you please delete all logging .pyc files before running the test
script? The problem appears to be caused by the __file__ value stored
inside a .pyc being different (possibly due to symlink changes) from the
source file it was originally compiled from.

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

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


More information about the Python-bugs-list mailing list