|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.x4juli.global.components.AbstractComponent
org.x4juli.global.components.AbstractFilter
org.x4juli.filter.LevelRangeFilter
This is a very simple filter based on level matching, which can be used to reject messages with priorities outside a certain range.
Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by Simon Kitching. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.
| Field Summary | |
(package private) boolean |
acceptOnMatch
Do we return ACCEPT when a match occurs. |
(package private) java.util.logging.Level |
levelMax
|
(package private) java.util.logging.Level |
levelMin
|
| Fields inherited from class org.x4juli.global.components.AbstractFilter |
|
| Fields inherited from class org.x4juli.global.components.AbstractComponent |
manager, repository |
| Fields inherited from interface org.x4juli.global.spi.ExtendedFilter |
ACCEPT, DENY, X4JULI_ACCEPT, X4JULI_DENY, X4JULI_NEUTRAL |
| Constructor Summary | |
LevelRangeFilter()
|
|
| Method Summary | |
int |
decide(ExtendedLogRecord record)
If the decision is DENY, then the event will be dropped.
|
boolean |
getAcceptOnMatch()
Get the value of the AcceptOnMatch option. |
java.util.logging.Level |
getLevelMax()
Get the value of the LevelMax option. |
java.util.logging.Level |
getLevelMin()
Get the value of the LevelMin option. |
private static boolean |
isGreaterOrEqual(java.util.logging.Level left,
java.util.logging.Level right)
|
void |
setAcceptOnMatch(boolean acceptOnMatch)
Set the AcceptOnMatch option. |
void |
setLevelMax(java.util.logging.Level levelMax)
Set the LevelMax option. |
void |
setLevelMin(java.util.logging.Level levelMin)
Set the LevelMin option. |
| Methods inherited from class org.x4juli.global.components.AbstractFilter |
activateOptions, getNext, isLoggable, setNext |
| Methods inherited from class org.x4juli.global.components.AbstractComponent |
getLogger, getLoggerRepository, getMessageProperties, getNonFloodingLogger, getProperty, getProperty, getProperty, getProperty, resetErrorCount, setObjectStore |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
boolean acceptOnMatch
false,
so that later filters get run by default
java.util.logging.Level levelMin
java.util.logging.Level levelMax
| Constructor Detail |
public LevelRangeFilter()
| Method Detail |
public int decide(ExtendedLogRecord record)
AbstractFilter
If the decision is DENY, then the event will be dropped.
If the decision is NEUTRAL, then the next filter, if any,
will be invoked. If the decision is ACCEPT then the event will be logged
without consulting with other filters in the chain.
decide in interface ExtendedFilterdecide in class AbstractFilterrecord - The LoggingEvent to decide upon.AbstractFilter.decide(org.x4juli.global.spi.ExtendedLogRecord)public java.util.logging.Level getLevelMax()
LevelMax option.
public java.util.logging.Level getLevelMin()
LevelMin option.
public boolean getAcceptOnMatch()
AcceptOnMatch option.
public void setLevelMax(java.util.logging.Level levelMax)
LevelMax option.
public void setLevelMin(java.util.logging.Level levelMin)
LevelMin option.
public void setAcceptOnMatch(boolean acceptOnMatch)
AcceptOnMatch option.
private static boolean isGreaterOrEqual(java.util.logging.Level left,
java.util.logging.Level right)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||