Re: strange behavious of the logging module?

2007-09-27 Thread Christian Meesters
Thanks Peter and Vinay, I finally understood. And indeed, removing the pyc-file in questions solves the problem - at least temporarily. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behavious of the logging module?

2007-09-25 Thread Vinay Sajip
On 25 Sep, 09:40, Peter Otten <[EMAIL PROTECTED]> wrote: > You could try setting > > logging._srcfile =logging.info.func_code.co_filename > > manually, but that might break other things. Or you recreate the pyc-files > of your distribution. Again, I don't know what might break... > Recreating .pyc

Re: strange behavious of the logging module?

2007-09-25 Thread Peter Otten
Christian Meesters wrote: > Peter Otten wrote: > >> Vinay Sajip wrote: >> >>> This is a known bug, and not specifically related to logging, though >>> it sometimes manifests itself via logging: >>> >>> http://bugs.python.org/issue1180193 >> >> Yup, thanks for looking into it. >> >> Peter > Th

Re: strange behavious of the logging module?

2007-09-25 Thread Christian Meesters
Peter Otten wrote: > Vinay Sajip wrote: > >> This is a known bug, and not specifically related to logging, though >> it sometimes manifests itself via logging: >> >> http://bugs.python.org/issue1180193 > > Yup, thanks for looking into it. > > Peter Thanks Vinay, but I am curious how issue 1180

Re: strange behavious of the logging module?

2007-09-25 Thread Peter Otten
Vinay Sajip wrote: > This is a known bug, and not specifically related to logging, though > it sometimes manifests itself via logging: > > http://bugs.python.org/issue1180193 Yup, thanks for looking into it. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behavious of the logging module?

2007-09-24 Thread Vinay Sajip
On Sep 24, 4:29 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Vinay Sajip wrote: > > On Sep 24, 8:03 am, Peter Otten <[EMAIL PROTECTED]> wrote: > > >> It would still be a good idea to file a bug report. > > > Not sure where the bug is. The script below, when called, prints > > "Information" to the c

Re: strange behavious of the logging module?

2007-09-24 Thread Peter Otten
Vinay Sajip wrote: > On Sep 24, 8:03 am, Peter Otten <[EMAIL PROTECTED]> wrote: >> >> It would still be a good idea to file a bug report. > > Not sure where the bug is. The script below, when called, prints > "Information" to the console and "INFO some_func Information" to > mc_rigid.log, as

Re: strange behavious of the logging module?

2007-09-24 Thread Vinay Sajip
On Sep 24, 8:03 am, Peter Otten <[EMAIL PROTECTED]> wrote: > > It would still be a good idea to file a bug report. Not sure where the bug is. The script below, when called, prints "Information" to the console and "INFO some_func Information" to mc_rigid.log, as I would expect. (Python 2.5.1)

Re: strange behavious of the logging module?

2007-09-24 Thread Christian Meesters
Thanks Peter and Gabriel, I see, so I should provide the application with an additional handler for the file in order to gain maximum independence of the two handlers (console & file stream). >> Also, adding %(funcName)-8s to the formatter in basigConfig does not work >> for me: instead of the fu

Re: strange behavious of the logging module?

2007-09-24 Thread Peter Otten
Christian Meesters wrote: > Also, adding %(funcName)-8s to the formatter in basigConfig does not work > for me: instead of the functions name the level in lower case gets inserted > into the logfile. When you call logging.info(...), "info" actually is the function name. As a workaround use loggin

Re: strange behavious of the logging module?

2007-09-23 Thread Gabriel Genellina
En Sun, 23 Sep 2007 18:53:53 -0300, Christian Meesters <[EMAIL PROTECTED]> escribi�: > import logging > logging.basicConfig(level=logging.ERROR, > format='%(levelname)-8s %(message)s', > filename='mc_rigid.log', > filemode='w') > # defi

strange behavious of the logging module?

2007-09-23 Thread Christian Meesters
Hi, having the following code: import logging logging.basicConfig(level=logging.ERROR, format='%(levelname)-8s %(message)s', filename='mc_rigid.log', filemode='w') # define a Handler which writes INFO messages or higher to the sys.stderr