      rootlogger.addHandler(q_handler)
      rootlogger.setLevel(loglevel)
  
  
  def log_setup(loglevel, logfile, command):
      """ initial log set up. """
      numeric_loglevel = get_loglevel(loglevel)
      root_loglevel = min(logging.DEBUG, numeric_loglevel)
      set_root_logger(loglevel=root_loglevel)
      log_format = FaceswapFormatter("%(asctime)s %(processName)-15s %(threadName)-15s "
 
</s> remove     s_handler = stream_handler(numeric_loglevel)
 </s> add     s_handler = stream_handler(numeric_loglevel, is_gui) </s> remove def stream_handler(loglevel):
 </s> add def stream_handler(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) </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)
def log_setup(loglevel, logfile, command, is_gui=False):
      rootlogger.addHandler(q_handler)
      rootlogger.setLevel(loglevel)
  
  
def log_setup(loglevel, logfile, command, is_gui=False):
      """ initial log set up. """
      numeric_loglevel = get_loglevel(loglevel)
      root_loglevel = min(logging.DEBUG, numeric_loglevel)
      set_root_logger(loglevel=root_loglevel)
      log_format = FaceswapFormatter("%(asctime)s %(processName)-15s %(threadName)-15s "
keep keep keep keep replace keep keep keep keep keep
 Remove extra line breaks from GUI console output 
lib/logger.py