What's wrong with my logging configuration

rambius rambiusparkisanius at gmail.com
Sat Nov 27 17:00:41 EST 2010


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')

if __name__ == '__main__':
    main()

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?

Regards
Rambius



More information about the Python-list mailing list