Logging lib doesn't work

Alexandre FOURNEL alexandre.fournel at sia-partners.com
Tue Sep 29 10:11:51 EDT 2020


Hi all !

I'm trying to use logging lib in my python program. 

To try this lib, I am using basic code like : 

"import logging
logging.basicConfig(filename='pont.txt', filemode='w',format='%(asctime)s %(message)s', datefmt='%d/%m/%Y %H:%M:%S', level=logging.DEBUG)
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')"

But between 2 execution, I have to open a new terminal to get new data in my file pont.txt. Do you know why ? 

Thanks 

Alexandre


More information about the Python-list mailing list