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 TypeMethodDescriptionvoid
addStatusEvent
(Status status) int
void
setDelegate
(StatusListener delegate) void
void
setLevelValue
(int levelValue) Methods inherited from class net.logstash.logback.status.DelegatingStatusListener
getDelegate, isStarted, setContext, start, stop
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager
-
Constructor Details
-
LevelFilteringStatusListener
public LevelFilteringStatusListener()
-
-
Method Details
-
addStatusEvent
- Specified by:
addStatusEvent
in interfaceStatusListener
- Overrides:
addStatusEvent
in classDelegatingStatusListener
-
setLevel
-
getLevelValue
public int getLevelValue() -
setLevelValue
public void setLevelValue(int levelValue) -
setDelegate
- Overrides:
setDelegate
in classDelegatingStatusListener
-