Class EvaluatorFilter<E>
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.filter.Filter<E>
ch.qos.logback.core.filter.AbstractMatcherFilter<E>
ch.qos.logback.core.filter.EvaluatorFilter<E>
- All Implemented Interfaces:
ContextAware, LifeCycle
The value of the
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
-
Field Summary
FieldsFields inherited from class AbstractMatcherFilter
onMatch, onMismatchFields inherited from class ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf the decision is, then the event will be dropped.FilterReply.DENYvoidsetEvaluator(EventEvaluator<E> evaluator) voidstart()Methods inherited from class AbstractMatcherFilter
getOnMatch, getOnMismatch, setOnMatch, setOnMismatchMethods inherited from class ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
evaluator
EventEvaluator<E> evaluator
-
-
Constructor Details
-
EvaluatorFilter
public EvaluatorFilter()
-
-
Method Details
-
start
-
getEvaluator
-
setEvaluator
-
decide
Description copied from class:FilterIf the decision is, then the event will be dropped. If the decision isFilterReply.DENY, then the next filter, if any, will be invoked. If the decision isFilterReply.NEUTRALthen the event will be logged without consulting with other filters in the chain.FilterReply.ACCEPT
-