code: def log_error(*error, cause=None):
      
      thread_id = threading.current_thread().ident
      text = " ".join(error)
      if cause:
          text += " due to " + str(cause)
  
      logger = get_logger()
      logger.error(LOG_THREAD_FORMAT.format(thread_id, text))
docs: Logs error
  
      :param error: error to log
      :param cause: (optional) cause of error