Package net.logstash.logback.status
Class LevelFilteringStatusListener
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
net.logstash.logback.status.DelegatingStatusListener
net.logstash.logback.status.LevelFilteringStatusListener
- All Implemented Interfaces:
ContextAware,LifeCycle,StatusListener
A
DelegatingStatusListener that filters Status events based on their level
(e.g. Status.INFO, Status.WARN, Status.ERROR)
before forwarding the status event to the delegate.
Only those Status events whose level is greater than or equal to
the configured level will be forwarded to the delegate StatusListener.
For example if level is Status.WARN, then status' whose level is
Status.WARN or Status.ERROR will be forwarded.
-
Field Summary
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusEvent(Status status) intvoidsetDelegate(StatusListener delegate) voidvoidsetLevelValue(int levelValue) Methods inherited from class net.logstash.logback.status.DelegatingStatusListener
getDelegate, isStarted, setContext, start, stopMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.status.StatusListener
isResetResistant
-
Constructor Details
-
LevelFilteringStatusListener
public LevelFilteringStatusListener()
-
-
Method Details
-
addStatusEvent
- Specified by:
addStatusEventin interfaceStatusListener- Overrides:
addStatusEventin classDelegatingStatusListener
-
setLevel
-
getLevelValue
public int getLevelValue() -
setLevelValue
public void setLevelValue(int levelValue) -
setDelegate
- Overrides:
setDelegatein classDelegatingStatusListener
-