  
      q_listener = QueueListener(LOG_QUEUE, f_handler, s_handler, c_handler,
                                 respect_handler_level=True)
      q_listener.start()
      logging.info('Log level set to: %s', loglevel.upper())
  
  
  def file_handler(loglevel, log_format):
      """ Add a logging rotating file handler """
      filename = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "faceswap.log")
 
</s> remove     log_file = RotatingFileHandler(filename, backupCount=1)
 </s> add     log_file = NoInheritRotatingFileHandler(filename, backupCount=1) </s> remove     filename = os.path.join(path, datetime.now().strftime('crash_report.%Y.%m.%d.%H%M%S%f.log'))
 </s> add     filename = os.path.join(path, datetime.now().strftime("crash_report.%Y.%m.%d.%H%M%S%f.log")) </s> remove         for new_level in (('VERBOSE', 15), ('TRACE', 5)):
 </s> add         for new_level in (("VERBOSE", 15), ("TRACE", 5)): </s> remove     ''' Check valid log level supplied and return numeric log level '''
 </s> add     """ Check valid log level supplied and return numeric log level """ </s> remove         raise ValueError('Invalid log level: %s' % loglevel)
 </s> add         raise ValueError("Invalid log level: %s" % loglevel)
    logging.info("Log level set to: %s", loglevel.upper())
  
      q_listener = QueueListener(LOG_QUEUE, f_handler, s_handler, c_handler,
                                 respect_handler_level=True)
      q_listener.start()
    logging.info("Log level set to: %s", loglevel.upper())
  
  
  def file_handler(loglevel, log_format):
      """ Add a logging rotating file handler """
      filename = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "faceswap.log")
keep keep keep keep replace keep keep keep keep keep
 Rotating File Handler permissions fix for Windows 
lib/logger.py