  
  def crash_log():
      """ Write debug_buffer to a crash log on crash """
      path = os.getcwd()
      filename = os.path.join(path, datetime.now().strftime('crash_report.%Y.%m.%d.%H%M%S%f.log'))
  
      # Wait until all log items have been processed
      while not LOG_QUEUE.empty():
          sleep(1)
  
 
</s> remove     log_file = RotatingFileHandler(filename, backupCount=1)
 </s> add     log_file = NoInheritRotatingFileHandler(filename, backupCount=1) </s> remove     logging.info('Log level set to: %s', loglevel.upper())
 </s> add     logging.info("Log level set to: %s", loglevel.upper()) </s> remove         for new_level in (('VERBOSE', 15), ('TRACE', 5)):
 </s> add         for new_level in (("VERBOSE", 15), ("TRACE", 5)): </s> remove         raise ValueError('Invalid log level: %s' % loglevel)
 </s> add         raise ValueError("Invalid log level: %s" % loglevel) </s> remove     ''' Check valid log level supplied and return numeric log level '''
 </s> add     """ Check valid log level supplied and return numeric log level """
    filename = os.path.join(path, datetime.now().strftime("crash_report.%Y.%m.%d.%H%M%S%f.log"))
  
  def crash_log():
      """ Write debug_buffer to a crash log on crash """
      path = os.getcwd()
    filename = os.path.join(path, datetime.now().strftime("crash_report.%Y.%m.%d.%H%M%S%f.log"))
  
      # Wait until all log items have been processed
      while not LOG_QUEUE.empty():
          sleep(1)
  
keep keep keep keep replace keep keep keep keep keep
 Rotating File Handler permissions fix for Windows 
lib/logger.py