[ python-Bugs-968245 ] Python Logging filename & file number
SourceForge.net
noreply at sourceforge.net
Mon Jun 7 15:19:15 EDT 2004
Bugs item #968245, was opened at 2004-06-07 10:49
Message generated for change (Settings changed) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=968245&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ryan (superleo303)
>Assigned to: Vinay Sajip (vsajip)
Summary: Python Logging filename & file number
Initial Comment:
I use Freebsd and redhat 9.0 linus at work.
Using Python Logging filename & file number on freebsd
works fine.
When i print a log statement, and have my config
formatter section set like:
[formatter_default]
format=%(asctime)s <%(levelname)s>
<%(module)s:%(lineno)s> %(message)s
datefmt=
On bsd my logs look like:
<INFO> <propmancmd:95> stateOnly is: DE
<INFO> <propmancmd:105> MEssages .........
<INFO> <propmancmd:107> collecting datasource: 1011
<INFO> <propman:98> Collectors overwrite existing
pickle files: 0
<INFO> <propman:99> Collectors run in
multiple threads: 4
<DEBUG> <propman:528> sql is:
...
See, the filename and file number get displayed with
each logging call,
Now, The same exact code run on the same exact version
of python on a linux machine yiedls the lines:
<INFO> <__init__:988> stateOnly is: DE
<INFO> <__init__:988> MEssages
<INFO> <__init__:988> collecting datasource: 1011
<INFO> <__init__:988> Collectors overwrite existing
pickle files: 0
<INFO> <__init__:988> Collectors run in
multiple threads: 4
<DEBUG> <__init__:988> sql is:
...
So i opened up ./python2.3/logging/__init__.py line
988 and it seems to be where the problem is.
Can someone take a look at this asap? I have to run
all my code on linux machines, so now i cant see which
file and which line is making the logging.
To reproduce, get a freebsd and linux machine,
then run a simple script that uses logging config files
and use the above example as your formatter in the
logging confrig file,
BSD should show the filenames and numbers, linux should
show __init__ 988 instead.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=968245&group_id=5470
More information about the Python-bugs-list
mailing list