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.

classification
Title: logging module formatter problem with %(filename)s
Type: Stage:
Components: macOS Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: david_k_hess, ronaldoussoren, zseil
Priority: normal Keywords:

Created on 2006-06-19 02:08 by david_k_hess, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg28831 - (view) Author: David Hess (david_k_hess) Date: 2006-06-19 02:08
With Python 2.4.3 installed via the .dmg on to MacOS, when the python 
modules are compiled, they are compiled by specifying the path in such a 
way that it contains a double slash. This causes the logging module to not 
be able to figure out which module is the correct one to replace for %
(filename)s.

The following is the crux of the issue:

>>> logging.debug.func_code.co_filename
'/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/
logging/__init__.py'
>>> logging.__file__
'/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
logging/__init__.pyc'
>>> 

These two strings need to match for %(filename)s to work.

I deleted /Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/logging/__init__.pyc and recompiled it by just importing 
logging. That fixed the problem.

I assume the fix will be in the installer somewhere.

msg28832 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2006-06-25 21:16
Logged In: YES 
user_id=580910

Fixed in revision #47093 for python2.5. 

I'm not closing the bug yet because I haven't backported this to 2.4 yet.
msg28833 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2007-04-03 07:46
The 2.4 branch is not maintained anymore.  Can this
bug be closed?
msg28834 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2007-07-09 07:32
Closing because this is fixed in 2.5 and beyond and 2.4 is closed for maintainance
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43520
2006-06-19 02:08:19david_k_hesscreate