apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/DeferredLogCache.java/DeferredLogCache/logTo
class DeferredLogCache:  static void logTo(Logger logger, Level level, String message, Object[] objects,
      Throwable throwable) {
    switch (level) {
      case DEBUG:
        if (throwable != null) {
          logger.debug(message, throwable);
        } else {
          logger.debug(message, objects);
        }
        return;
      case INFO:
        if (throwable != null) {
          logger.info(message, throwable);
        } else {
          logger.info(message, objects);
        }
        return;
      case WARN:
        if (throwable != null) {
          logger.warn(message, throwable);
        } else {
          logger.warn(message, objects);
        }
        return;
      case ERROR:
        if (throwable != null) {
          logger.error(message, throwable);
        } else {
          logger.error(message, objects);
        }
        break;
      default:
        throw new IllegalStateException("Unexpected value: " + level);
    }
  }