org.apache.log4j.varia
public class LevelMatchFilter extends Filter
The filter admits two options LevelToMatch and
AcceptOnMatch. If there is an exact match between the value
of the LevelToMatch option and the level of the {@link
LoggingEvent}, then the {@link #decide} method returns {@link
Filter#ACCEPT} in case the AcceptOnMatch option value is set
to true
, if it is false
then {@link
Filter#DENY} is returned. If there is no match, {@link
Filter#NEUTRAL} is returned.
Since: 1.2
Method Summary | |
---|---|
int | decide(LoggingEvent event)
Return the decision of this filter.
|
boolean | getAcceptOnMatch() |
String | getLevelToMatch() |
void | setAcceptOnMatch(boolean acceptOnMatch) |
void | setLevelToMatch(String level) |
true
. The
returned decision is {@link Filter#DENY} if the
AcceptOnMatch property is set to false.