Package: python2.5
Version: 2.5-5

When using the logging module, and using a custom format the includes
"%(module)s" or "%(funcName)s", improper results are set.

Example (example.py):
import logging
logging.basicConfig(level=logging.DEBUG, format='%(module)s.%(funcName)s
%(levelname)-8s: %(message)s')

logging.info("oldinfo")


Results:
__init__._log INFO    : oldinfo

Should get:
example.<module> INFO    : oldinfo

Notes:
"<module>" would be replaced with a function name if logging.info() was
called within a function.

Work-around:
I believe the problem is caused by the stale pyc file
"/usr/lib/python2.5/logging.pyc"  Upon removing the file, logging
behaves appropriately.

I am using Linux wrench 2.6.18-3-k7 #1 SMP Mon Dec 4 17:23:11 UTC 2006
i686 GNU/Linux and libc6 2.3.6.ds1-11.

-Fritzy


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to