Error等级日志<br>

@param log 日志对象
@param e 需在日志中堆栈打印的异常
163468
public static void error(Log log, Throwable e) {
		error(log, e, e.getMessage());
	}
1143359
@Override
  public void log(Level level, Object message, Throwable e) {
    if(level == null) {
      level = Level.FATAL;
    }

    switch(level) {
    case TRACE:
      logger.trace(message.toString(), e);
      break;
    case DEBUG:
      logger.debug(message.toString(), e);
      break;
    case INFO:
      logger.info(message.toString(), e);
      break;
    case WARN:
      logger.warn(message.toString(), e);
      break;
    case ERROR:
      logger.error(message.toString(), e);
      break;
    case FATAL:
      logger.error(message.toString(), e);
      break;
    default:
      logger.error("Unhandled Logging Level: " + level
        + " with log message: " + message.toString(), e);
    }
  }
945937
public void error(String msg, Throwable e) {
        doLog(msg, LOG_ERROR, null, e);
    }
852144
public void error(final String message) {
        messages.add(new LogMessage(message, LogMessage.Type.ERROR));
        log.error(message);
    }
888681
protected void logException(CharSequence msg, Exception e) {
    System.err.println(msg + ":" + e.getMessage());
    e.printStackTrace();
  }
1314016
def safe_log_error(self, error: Exception, *info: str):
        """"""
        self.__do_safe(lambda: self.logger.error(error, *info))
1294549
public void onError(Exception e) {
    LOG.log(Level.SEVERE, e.getMessage(), e);
  }
922622
public void log(Throwable error, Level level) {
    log(error, null, null, level);
  }
1071461
public static void exception(String message, Throwable e) {
    if(message == null && e != null) {
      message = e.getMessage();
    }
    logExpensive(Level.SEVERE, message, e);
  }
908643
public static void warning(String message, Throwable e) {
    if(message == null && e != null) {
      message = e.getMessage();
    }
    logExpensive(Level.WARNING, message, e);
  }
738136
public static void logError(Span span, Throwable e) {
        HashMap<String, Object> fields = new HashMap<>();
        fields.put(Fields.ERROR_OBJECT, e);
        String message = e.getMessage();
        if (message != null) {
            fields.put(Fields.MESSAGE, message);
        }
        span.log(fields);
    }
280282
protected void pacedErrorLog(String message, StoreAccessException e) {
    pacer.pacedCall(() -> LOGGER.error(message + " - Similar messages will be suppressed for 30 seconds", e), () -> LOGGER.debug(message, e));
  }
434154
@Override
  public void log(Level level, Object message, Throwable e) {
    org.apache.log4j.Level pLevel = org.apache.log4j.Level.DEBUG;

    switch (level == null ? Level.FATAL : level) {
    case TRACE:
      pLevel = org.apache.log4j.Level.TRACE;
      break;
    case DEBUG:
      pLevel = org.apache.log4j.Level.DEBUG;
      break;
    case INFO:
      pLevel = org.apache.log4j.Level.INFO;
      break;
    case WARN:
      pLevel = org.apache.log4j.Level.WARN;
      break;
    case ERROR:
      pLevel = org.apache.log4j.Level.ERROR;
      break;
    case FATAL:
      pLevel = org.apache.log4j.Level.FATAL;
      break;
    default:
      // I don't know what this is, so consider it fatal
      pLevel = org.apache.log4j.Level.FATAL;
      l4jLogger.log("net.spy.compat.log.AbstractLogger", pLevel, "Unhandled "
          + "log level:  " + level + " for the following message", null);
    }
    l4jLogger.log("net.spy.compat.log.AbstractLogger", pLevel, message, e);
  }
1371001
protected static void printErrorMessage(Exception e) {
    if(e instanceof AbortException) {
      // ensure we actually show the message:
      LoggingConfiguration.setVerbose(Level.VERBOSE);
      LOG.verbose(e.getMessage());
    }
    else if(e instanceof UnspecifiedParameterException) {
      LOG.error(e.getMessage());
    }
    else if(e instanceof ParameterException) {
      LOG.error(e.getMessage());
    }
    else {
      LOG.exception(e);
    }
  }
1276555
public function logErrorException(\Exception $e)
    {
        if ($this->getServerContext()->hasLogger(LoggerUtils::SYSTEM)) {
            $this->getServerContext()->getLogger(LoggerUtils::SYSTEM)->error($e->__toString());
        }
    }
812474
public static void logDevFailed(final DevFailed e, final Logger logger) {
        if (e.errors != null) {
            for (int i = 0; i < e.errors.length; i++) {
                logger.error("Error Level {} :", i);
                logger.error("\t - desc: {}", e.errors[i].desc);
                logger.error("\t - origin: {}", e.errors[i].origin);
                logger.error("\t - reason: {}", e.errors[i].reason);
                String sev = "";
                if (e.errors[i].severity.value() == ErrSeverity.ERR.value()) {
                    sev = "ERROR";
                } else if (e.errors[i].severity.value() == ErrSeverity.PANIC.value()) {
                    sev = "PANIC";
                } else if (e.errors[i].severity.value() == ErrSeverity.WARN.value()) {
                    sev = "WARN";
                }
                logger.error("\t - severity: {}", sev);
            }
        } else {
            logger.error("EMPTY DevFailed");
        }
    }
617489
public final void error(Object message, Throwable t) {
        if (isLevelEnabled(LOG_LEVEL_ERROR)) {
            log(LOG_LEVEL_ERROR, message, t);
        }
    }