Re: What's wrong with my logging configuration

2010-11-27 Thread Ben Finney
rambius writes: > I found the culprit. Yesterday I added a file called copy.py. It > clashed with the python built-in module copy and caused that nasty > error. You may be glad to know that newer versions of Python can distinguish absolute imports from relative imports, to address this very prob

Re: What's wrong with my logging configuration

2010-11-27 Thread Ben Finney
rambius writes: > On what environment did you try it? I get the same results with both Python 2 and Python 3 on GNU+Linux: = $ python Python 2.6.6 (r266:84292, Oct 9 2010, 13:53:14) […] $ python3 Python 3.1.3rc1 (r313rc1:86453, Nov 14 2010, 05:49:40) […] = > This is so strange. If I

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
Hello, I found the culprit. Yesterday I added a file called copy.py. It clashed with the python built-in module copy and caused that nasty error. Regards Rambius -- http://mail.python.org/mailman/listinfo/python-list

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
Hello Ben, On what environment did you try it? On Nov 27, 5:09 pm, Ben Finney wrote: > rambius writes: > > When I run this program the logger statement after 'import optparse' > > does not appear. The first logger statement before optparse does > > appear. Has anyone experienced similar behavio

Re: What's wrong with my logging configuration

2010-11-27 Thread Ben Finney
rambius writes: > When I run this program the logger statement after 'import optparse' > does not appear. The first logger statement before optparse does > appear. Has anyone experienced similar behaviour? I use the same config file (from your first message) and your shorter program, and I see t

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
Hello, I was able to reproduce the problem with even a smaller program: #!/usr/bin/env python import logging import logging.config logging.config.fileConfig('logging.config') logger = logging.getLogger('test') def main(): logger.fatal('test1') import optparse logger.fatal('test2')

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
On Nov 27, 4:07 pm, rambius wrote: > Hello, > > I am using python logging and as of today it stopped working. Here is > my program: > I forgot to give my environment: $ uname -a Darwin arielmac.lan 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEA