[logging] problems in Python 2.3

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Feb 24 01:30:44 CET 2004


Frantisek Fuka <fuka at fuxoft.cz> wrote in message news:<c15rkc$2ea5$1 at ns.felk.cvut.cz>...
> I am using the standard "logging" module included with Python and it 
> seems it doesn't correctly identify the filename (and thus module name) 
> from where the logging method was called. In fact, no matter from which 
> module I call the logging method, the resulting log says that the 
> filename of the caller is:
> 
> \tmp\python.2664\usr\lib\python2.3\logging\__init__.py
> 
> (this seems to me like a reference to the logging module itself combined 
> with some sort of weird temporary storage)
> 
> This happens on my Windows98 machine both under Cygwin and under Windows 
> Python (both of them 2.3). When I try the exact same script on the Linux 
> server with Python 2.2 installed, it displays the filenames correctly.

Strange that it happens the same under Windows. Why would it be
looking for a Unix-like path such as the one you describe under
Windows, when not using cygwin?

Are you using "import logging" rather than "from logging import *" in
your script?



More information about the Python-list mailing list