This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2007年02月26日 22:18 by murrayg, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg31371 - (view) | Author: Glenn Murray (murrayg) | Date: 2007年02月26日 22:18 | |
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
|
|||
| msg31372 - (view) | Author: Vinay Sajip (vinay.sajip) * (Python committer) | Date: 2007年02月28日 21:15 | |
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. |
|||
| msg31373 - (view) | Author: Glenn Murray (murrayg) | Date: 2007年03月05日 04:27 | |
Hi Vinay, Good call, recompiling the /usr/lib/python2.4/logging/*.pyc files fixed the problem. Thanks, Glenn |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:22 | admin | set | github: 44625 |
| 2007年02月26日 22:18:14 | murrayg | create | |