public class EvaluatorFilter<E> extends AbstractMatcherFilter<E>
AbstractMatcherFilter.onMatch
and AbstractMatcherFilter.onMismatch
attributes is set
to FilterReply.NEUTRAL
, so that a badly configured evaluator filter does
not disturb the functioning of the filter chain.
It is expected that one of the two attributes will have its value changed
to FilterReply.ACCEPT
or FilterReply.DENY
. That way, it is possible to
decide if a given result must be returned after the evaluation either failed
or succeeded.
For more information about filters, please refer to the online manual at http://logback.qos.ch/manual/filters.html
Constructor and Description |
---|
EvaluatorFilter() |
Modifier and Type | Method and Description |
---|---|
FilterReply |
decide(E event)
If the decision is
, then the event will be
dropped. |
EventEvaluator<E> |
getEvaluator() |
void |
setEvaluator(EventEvaluator<E> evaluator) |
void |
start() |
getOnMatch, getOnMismatch, setOnMatch, setOnMismatch
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
public void start()
public EventEvaluator<E> getEvaluator()
public void setEvaluator(EventEvaluator<E> evaluator)
public FilterReply decide(E event)
Filter
FilterReply.DENY
, then the event will be
dropped. If the decision is FilterReply.NEUTRAL
, then the next
filter, if any, will be invoked. If the decision is
FilterReply.ACCEPT
then the event will be logged without
consulting with other filters in the chain.Copyright © 2010 - 2020 Adobe. All Rights Reserved