[logging] problems in Python 2.3

Frantisek Fuka fuka at fuxoft.cz
Tue Feb 24 14:27:29 EST 2004


Vinay Sajip wrote:
> 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?

Yes, I am using "import logging". And there is nothing like 
"python.2664" in my cygwin "/tmp/" directory (and never was). My 
application is in completely different directory. Also note that the 
displayed filename has BACKSLASHES, not forward slashes.

-- 
                                          Frantisek Fuka
(yes, that IS my real name)
(and it's pronounced "Fran-tjee-shek Foo-kah")
----------------------------------------------------
My E-mail:   fuka at fuxoft.cz
My Homepage: http://www.fuxoft.cz
My ICQ:      2745855



More information about the Python-list mailing list