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
Post a Comment