      log_file.setLevel(loglevel)
      return log_file
  
  
  def stream_handler(loglevel):
      """ Add a logging cli handler """
      # Don't set stdout to lower than verbose
      loglevel = max(loglevel, 15)
      log_format = FaceswapFormatter("%(asctime)s %(levelname)-8s %(message)s",
                                     datefmt="%m/%d/%Y %H:%M:%S")
 
</s> remove     log_console = TqdmHandler(sys.stdout)
 </s> add     if is_gui:
        # tqdm.write inserts extra lines in the GUI, so use standard output as
        # it is not needed there.
        log_console = logging.StreamHandler(sys.stdout)
    else:
        log_console = TqdmHandler(sys.stdout) </s> remove def log_setup(loglevel, logfile, command):
 </s> add def log_setup(loglevel, logfile, command, is_gui=False): </s> remove     s_handler = stream_handler(numeric_loglevel)
 </s> add     s_handler = stream_handler(numeric_loglevel, is_gui) </s> remove         log_setup(arguments.loglevel, arguments.logfile, self.command)
 </s> add         is_gui = hasattr(arguments, "redirect_gui") and arguments.redirect_gui
        log_setup(arguments.loglevel, arguments.logfile, self.command, is_gui)
def stream_handler(loglevel, is_gui):
      log_file.setLevel(loglevel)
      return log_file
  
  
def stream_handler(loglevel, is_gui):
      """ Add a logging cli handler """
      # Don't set stdout to lower than verbose
      loglevel = max(loglevel, 15)
      log_format = FaceswapFormatter("%(asctime)s %(levelname)-8s %(message)s",
                                     datefmt="%m/%d/%Y %H:%M:%S")
keep keep keep keep replace keep keep keep keep keep
 Remove extra line breaks from GUI console output 
lib/logger.py