def close_logger():
 for handler in _logger.handlers:
  _logger.removeHandler(handler)
  if isinstance(handler, logging.FileHandler):
   handler.close()

def close_logger ( ) : for handler in _logger . handlers : _logger . removeHandler ( handler ) if isinstance ( handler , logging . FileHandler ) : handler . close ( )
closes the logger handler for the file .