python logging does not release file -


i have been using logging , notice after first compile, output file logging hangs, , cannot remove till close idle.

i believe should "close" logging before compilation finishs, don't know how way using logging:

logfile = os.path.join(backup_folder,'test.log') logging.basicconfig(filename=logfile,level=logging.debug,format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s') logging.debug('test') 

so seems have found way adding in end:

logging.shutdown() 

this instruction close handlers openned.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -