Package com.helger.commons.log
Class ConditionalLogger
- java.lang.Object
-
- com.helger.commons.log.ConditionalLogger
-
- All Implemented Interfaces:
IEnabledIndicator
@ThreadSafe public final class ConditionalLogger extends Object implements IEnabledIndicator
Conditional logger- Since:
- 11.0.4
- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description ConditionalLogger(org.slf4j.Logger aLogger)ConditionalLogger(org.slf4j.Logger aLogger, boolean bEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(Supplier<String> aMsgSupplier)voiddebug(Supplier<String> aMsgSupplier, Exception ex)voiderror(String sMsg)voiderror(String sMsg, Exception ex)voiderror(Supplier<String> aMsgSupplier)voiderror(Supplier<String> aMsgSupplier, Exception ex)voidinfo(String sMsg)voidinfo(String sMsg, Exception ex)voidinfo(Supplier<String> aMsgSupplier)voidinfo(Supplier<String> aMsgSupplier, Exception ex)booleanisEnabled()booleansetEnabled(boolean bEnabled)StringtoString()voidtrace(Supplier<String> aMsgSupplier)voidtrace(Supplier<String> aMsgSupplier, Exception ex)voidwarn(String sMsg)voidwarn(String sMsg, Exception ex)voidwarn(Supplier<String> aMsgSupplier)voidwarn(Supplier<String> aMsgSupplier, Exception ex)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.state.IEnabledIndicator
and, isDisabled, or
-
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceIEnabledIndicator- Returns:
trueif the object is currently enabled,falseotherwise.
-
setEnabled
public boolean setEnabled(boolean bEnabled)
-
-