      loglevel = max(loglevel, 15)
      log_format = FaceswapFormatter("%(asctime)s %(levelname)-8s %(message)s",
                                     datefmt="%m/%d/%Y %H:%M:%S")
  
      log_console = logging.StreamHandler(sys.stdout)
      log_console.setFormatter(log_format)
      log_console.setLevel(loglevel)
      return log_console
  
  
 
</s> remove # Add a flag to logging.LogRecord to not strip formatting from particular records
old_factory = logging.getLogRecordFactory()


 </s> add old_factory = logging.getLogRecordFactory()  # pylint: disable=invalid-name </s> remove             logger.verbose("Resizing image from %sx%s to %s.",
                           width, height, "x".join(str(i) for i in dims))
 </s> add             logger.trace("Resizing image from %sx%s to %s.",
                         width, height, "x".join(str(i) for i in dims))
    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")
  
    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
 Use tqdm.write for StreamLogger. Reduce extract resize loglevel. 
lib/logger.py