public class LevelFilteringStatusListener extends DelegatingStatusListener
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.
context| Constructor and Description |
|---|
LevelFilteringStatusListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
addStatusEvent(Status status) |
int |
getLevelValue() |
void |
setDelegate(StatusListener delegate) |
void |
setLevel(String level) |
void |
setLevelValue(int levelValue) |
getDelegate, isStarted, setContext, start, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManagerpublic void addStatusEvent(Status status)
addStatusEvent in interface StatusListeneraddStatusEvent in class DelegatingStatusListenerpublic void setLevel(String level)
public int getLevelValue()
public void setLevelValue(int levelValue)
public void setDelegate(StatusListener delegate)
setDelegate in class DelegatingStatusListenerCopyright © 2013–2022. All rights reserved.