[ python-Bugs-968245 ] Python Logging filename & file number
SourceForge.net
noreply at sourceforge.net
Wed Jun 9 05:26:54 EDT 2004
Bugs item #968245, was opened at 2004-06-07 15:49
Message generated for change (Comment added) made by vsajip
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.
----------------------------------------------------------------------
>Comment By: Vinay Sajip (vsajip)
Date: 2004-06-09 09:26
Message:
Logged In: YES
user_id=308438
The problem appears to be related to some underlying
problem with sys._getframe(). Can you please download the
attached stackwalk.tar.gz and run it on both FreeBSD and
Linux? Please post your findings here, thanks. Note that the
stackwalk stuff contains no calls to the logging package.
----------------------------------------------------------------------
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