src/main/java/com/arpnetworking/steno/Logger.java
public void warn(final Consumer<DeferredLogBuilder> consumer) {
        if (_slf4jLogger.isWarnEnabled()) {
            final LogBuilder logBuilder = new DefaultLogBuilder(this, LogLevel.WARN);
            consumer.accept(logBuilder);
            logBuilder.log();
        }
    }
public void warn(final Consumer<DeferredLogBuilder> consumer) {
        if (_slf4jLogger.isWarnEnabled()) {
            final LogBuilder logBuilder = new DefaultLogBuilder(this, LogLevel.WARN);
            consumer.accept(logBuilder);
            logBuilder.log();
        }
    }
Create a new log event at the warn level. The provided <code>Consumer</code>
populates a <code>DeferredLogBuilder</code> to define the log event. The
consumer may not be invoked if it is not necessary. Therefore it is
important not to include side-effects in the provided <code>Consumer</code>.

@since 1.12.0

@param consumer Function to populate the <code>DeferredLogBuilder</code>.