- java.lang.Object
-
- br.com.objectos.logging.NoopLogger
-
- All Implemented Interfaces:
Logger
public class NoopLogger extends Object implements Logger
A no-opLoggerimplementation (for the most part). The one exception is theLogger.replace(Logger)operation that actually returns the supplied value.- Since:
- 2
-
-
Constructor Summary
Constructors Constructor Description NoopLogger()The solepublicconstructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NoopLoggergetInstance()Returns thestaticinstance.booleanisEnabled(Event event)Returnsfalse.voidlog(Event0 event)Does nothing, this is a no-op logger.<T1> voidlog(Event1<T1> event, T1 v1)Does nothing, this is a no-op logger.<T1,T2>
voidlog(Event2<T1,T2> event, T1 v1, T2 v2)Does nothing, this is a no-op logger.<T1,T2,T3>
voidlog(Event3<T1,T2,T3> event, T1 v1, T2 v2, T3 v3)Does nothing, this is a no-op logger.Loggerreplace(Logger logger)Returns the givenloggervalue.
-
-
-
Method Detail
-
getInstance
public static NoopLogger getInstance()
Returns thestaticinstance. This is method is provided as a convenience and to avoid creating multiple instances of this instance.- Returns:
- the
staticinstance
-
isEnabled
public boolean isEnabled(Event event)
Returnsfalse.
-
log
public void log(Event0 event)
Does nothing, this is a no-op logger.
-
log
public <T1> void log(Event1<T1> event, T1 v1)
Does nothing, this is a no-op logger.
-
log
public <T1,T2> void log(Event2<T1,T2> event, T1 v1, T2 v2)
Does nothing, this is a no-op logger.
-
log
public <T1,T2,T3> void log(Event3<T1,T2,T3> event, T1 v1, T2 v2, T3 v3)
Does nothing, this is a no-op logger.
-
-