def collect_log_file(host, log_path, dest_path):
 logging.info('Collecting %s...', log_path)
 try:
  host.get_file(log_path, dest_path, preserve_perm=False)
 except Exception:
  logging.warning('Collection of %s failed', log_path)

def collect_log_file ( host , log_path , dest_path ) : logging . info ( 'Collecting %s...' , log_path ) try : host . get_file ( log_path , dest_path , preserve_perm = False ) except Exception : logging . warning ( 'Collection of %s failed' , log_path )
collects a log file from the remote machine .