      loglevel = max(loglevel, 15)
      log_format = FaceswapFormatter("%(asctime)s %(levelname)-8s %(message)s",
                                     datefmt="%m/%d/%Y %H:%M:%S")
  
      log_console = TqdmHandler(sys.stdout)
      log_console.setFormatter(log_format)
      log_console.setLevel(loglevel)
      return log_console
  
  
 
</s> remove def stream_handler(loglevel):
 </s> add def stream_handler(loglevel, is_gui): </s> remove     s_handler = stream_handler(numeric_loglevel)
 </s> add     s_handler = stream_handler(numeric_loglevel, is_gui) </s> remove def log_setup(loglevel, logfile, command):
 </s> add def log_setup(loglevel, logfile, command, is_gui=False): </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)
    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)
      loglevel = max(loglevel, 15)
      log_format = FaceswapFormatter("%(asctime)s %(levelname)-8s %(message)s",
                                     datefmt="%m/%d/%Y %H:%M:%S")
  
    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)
      log_console.setFormatter(log_format)
      log_console.setLevel(loglevel)
      return log_console
  
  
keep keep keep keep replace keep keep keep keep keep
 Remove extra line breaks from GUI console output 
lib/logger.py