Re: Logging module: problem with some mapping keys

2006-12-15 Thread Peter Otten
Tekkaman wrote: >> Putting /usr/lib64/python2.4 as the first entry into your >> >> PYTHONPATH >> >> environment variable might fix the problem (the idea is >> that /usr/lib64/python2.4 precedes /usr/lib/python2.4 in sys.path and is >> therefore used for the import of the logging package). > Thank

Re: Logging module: problem with some mapping keys

2006-12-15 Thread Tekkaman
On Dec 14, 6:41 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Tekkaman wrote: >> lib is a symlink to lib64 > So my initial diagnosis was correct. Unfortunately I can no longer recommend > that you remove the symlink... > Yes. What I really meant in my first reply was "it's not a symlink in the scr

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Peter Otten
Tekkaman wrote: > lib is a symlink to lib64 So my initial diagnosis was correct. Unfortunately I can no longer recommend that you remove the symlink... Putting /usr/lib64/python2.4 as the first entry into your PYTHONPATH environment variable might fix the problem (the idea is that /usr/lib64

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Tekkaman
Peter Otten wrote: > Tekkaman wrote: > > > Peter Otten wrote: > >> Tekkaman wrote: > >> > >> > Thanks for the hint, but it's not a symlink > >> > >> What does logging._srcfile contain? Should be > >> > >> >>> import logging > >> >>> logging._srcfile > >> '/usr/lib/python2.4/logging/__init__.py' >

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Tekkaman
lib is a symlink to lib64 Peter Otten wrote: > Tekkaman wrote: > > > Peter Otten wrote: > >> Tekkaman wrote: > >> > >> > Thanks for the hint, but it's not a symlink > >> > >> What does logging._srcfile contain? Should be > >> > >> >>> import logging > >> >>> logging._srcfile > >> '/usr/lib/python2

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Peter Otten
Tekkaman wrote: > Peter Otten wrote: >> Tekkaman wrote: >> >> > Thanks for the hint, but it's not a symlink >> >> What does logging._srcfile contain? Should be >> >> >>> import logging >> >>> logging._srcfile >> '/usr/lib/python2.4/logging/__init__.py' >> >> on your machine, but probably isn't.

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Tekkaman
'/usr/lib64/python2.4/logging/__init__.py' Peter Otten wrote: > Tekkaman wrote: > > > Thanks for the hint, but it's not a symlink > > What does logging._srcfile contain? Should be > > >>> import logging > >>> logging._srcfile > '/usr/lib/python2.4/logging/__init__.py' > > on your machine, but pro

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Peter Otten
Tekkaman wrote: > Thanks for the hint, but it's not a symlink What does logging._srcfile contain? Should be >>> import logging >>> logging._srcfile '/usr/lib/python2.4/logging/__init__.py' on your machine, but probably isn't. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Tekkaman
Peter Otten wrote: > > An evil symlink, maybe? Thanks for the hint, but it's not a symlink > > $ ln -s /usr/local/lib/python2.4/logging > $ python > [snip] > >>> import logging > >>> logging.basicConfig(format="%(pathname)s") > >>> logging.getLogger().critical("yadda") > /usr/local/lib/python2.4/l

Re: Logging module: problem with some mapping keys

2006-12-14 Thread Tekkaman
sim.sim wrote: > Hi, i've check documentation, and found that logging.basicConfig takes > no arguments (probably we have different versions of logging package), Your Python version is < 2.4. Now basicConfig takes optional keyword args: basicConfig([**kwargs]) Does basic configuration for the log

Re: Logging module: problem with some mapping keys

2006-12-13 Thread Peter Otten
Tekkaman wrote: > I'm getting a strange behaviour from the "pathname" and "lineno" > formatter mapping keys. Instead of my file and my line number I get: > > /usr/lib/python2.4/logging/__init__.py > > as the file, and 1072 as the line number. I set up my config as > follows: > > logBaseConf = {

Re: Logging module: problem with some mapping keys

2006-12-13 Thread sim.sim
Hi, i've check documentation, and found that logging.basicConfig takes no arguments (probably we have different versions of logging package), and i've never used it. just try this: fileName = 'testlog.log' logName = 'LOG' iHandler = logging.FileHandler(fileName) iHandler.setFormatter( logging.F