@Nullable
    private static <T> T getUserValue(Function<FlagsProvider, @Nullable T> method, String flagName,
                                      Predicate<T> validator) {
        for (FlagsProvider provider : FLAGS_PROVIDERS) {
            try {
                final T value = method.apply(provider);
                if (value == null) {
                    continue;
                }

                if (!validator.test(value)) {
                    logger.warn("{}: {} ({}, validation failed)", flagName, value, provider.name());
                    continue;
                }

                logger.info("{}: {} ({})", flagName, value, provider.name());
                return value;
            } catch (Exception ex) {
                logger.warn("{}: ({}, {})", flagName, provider.name(), ex.getMessage());
            }
        }

        return null;
    }
Returns whether {@link AnnotatedService} should leave request/response content logs
by default when a {@link LoggingService} is added.

<p>By default, this option is enabled. Specify the
{@code -Dcom.linecorp.armeria.annotatedServiceContentLogging=false} JVM option to
override the default value.
core/src/main/java/com/linecorp/armeria/common/Flags.java