All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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).

The newest version!
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 value) { return singleton(); } @Override public LoggingEventBuilder setCause(Throwable cause) { return singleton(); } @Override public void log() { } @Override public LoggingEventBuilder setMessage(String message) { return this; } @Override public LoggingEventBuilder setMessage(Supplier messageSupplier) { return this; } @Override public void log(String message) { } @Override public void log(Supplier messageSupplier) { } @Override public void log(String message, Object arg) { } @Override public void log(String message, Object arg0, Object arg1) { } @Override public void log(String message, Object... args) { } }