code: public static ValidatedLoggingConfig create(LoggingConfig configProto) {
      Map<String, ValidatedLoggableElement> elementsByName = new LinkedHashMap<>();
      Map<Long, ValidatedLoggableElement> elementsById = new LinkedHashMap<>();
      elementsByName.put(UNDEFINED_VE.getName(), UNDEFINED_VE);
      elementsById.put(UNDEFINED_VE.getId(), UNDEFINED_VE);
      // perfect duplicates are allowed, though not encouraged.
      for (LoggableElement element : ImmutableSet.copyOf(configProto.getElementList())) {
        String name = element.getName();
        checkArgument(BaseUtils.isDottedIdentifier(name), "'%s' is not a valid identifier", name);
        checkArgument(
            MIN_ID_VALUE <= element.getId() && element.getId() <= MAX_ID_VALUE,
            "ID %s for '%s' must be between %s and %s (inclusive).",
            element.getId(),
            name,
            MIN_ID_VALUE,
            MAX_ID_VALUE);
        ValidatedLoggableElement elementConfig = ValidatedLoggableElement.create(element);
        ValidatedLoggableElement oldWithSameId =
            elementsById.put(elementConfig.getId(), elementConfig);
        if (oldWithSameId != null) {
          throw new IllegalArgumentException(
              String.format(
                  "Found 2 LoggableElements with the same id %d: %s and %s",
                  elementConfig.getId(), oldWithSameId.getName(), elementConfig.getName()));
        }
        ValidatedLoggableElement oldWithSameName =
            elementsByName.put(elementConfig.getName(), elementConfig);
        if (oldWithSameName != null) {
          throw new IllegalArgumentException(
              String.format(
                  "Found 2 LoggableElements with the same name %s, their ids are %d and %d",
                  elementConfig.getName(), oldWithSameName.getId(), elementConfig.getId()));
        }
      }
      return new ValidatedLoggingConfig(ImmutableMap.copyOf(elementsByName));
    }
docs: Parses the logging config proto into a {@link ValidatedLoggingConfig}.
  
  @throws IllegalArgumentException if there is an error during parsing.