org.slf4j.spi.NOPLoggingEventBuilder Maven / Gradle / Ivy
Go to download
This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including
all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and
JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up
with different versions on classes on the class path).
package org.slf4j.spi;
import java.util.function.Supplier;
import org.slf4j.Marker;
import org.slf4j.event.Level;
/**
* A no-operation implementation of {@link LoggingEventBuilder}.
*
* As the name indicates, the method in this class do nothing, except when a return value is expected
* in which case a singleton, i.e. the unique instance of this class is returned.
*
Returns the singleton instance of this class.
* Used by {@link org.slf4j.Logger#makeLoggingEventBuilder(Level) makeLoggingEventBuilder(Level)}.
*
* @return the singleton instance of this class
*/
public static LoggingEventBuilder singleton() {
return SINGLETON;
}
@Override
public LoggingEventBuilder addMarker(Marker marker) {
return singleton();
}
@Override
public LoggingEventBuilder addArgument(Object p) {
return singleton();
}
@Override
public LoggingEventBuilder addArgument(Supplier> objectSupplier) {
return singleton();
}
@Override
public LoggingEventBuilder addKeyValue(String key, Object value) {
return singleton();
}
@Override
public LoggingEventBuilder addKeyValue(String key, Supplier