|
Log4j 1.3alpha-7 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.log4j.rolling.FilterBasedTriggeringPolicy
FilterBasedTriggeringPolicy determines if rolling should be triggered by evaluating the current message against a set of filters. Unless a filter rejects a message, a rolling event will be triggered.
Constructor Summary | |
FilterBasedTriggeringPolicy()
Creates a new FilterBasedTriggeringPolicy. |
Method Summary | |
void |
activateOptions()
Activate the options that were previously set with calls to option setters. This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set. For example, the FileAppender has the |
void |
addFilter(Filter newFilter)
Add a filter to end of the filter list. |
void |
clearFilters()
Clear the filters chain. |
Filter |
getFilter()
Returns the head Filter. |
boolean |
isTriggeringEvent(Appender appender,
LoggingEvent event,
String file,
long fileLength)
Determines if a rollover may be appropriate at this time. If true is returned, RolloverPolicy.rollover will be called but it can determine that a rollover is not warranted. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilterBasedTriggeringPolicy()
Method Detail |
public boolean isTriggeringEvent(Appender appender, LoggingEvent event, String file, long fileLength)
isTriggeringEvent
in interface TriggeringPolicy
appender
- A reference to the appender.event
- A reference to the currently event.file
- The filename for the currently active log file.fileLength
- Length of the file in bytes.
public void addFilter(Filter newFilter)
newFilter
- filter to add to end of list.public void clearFilters()
public Filter getFilter()
public void activateOptions()
This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.
For example, the FileAppender has the File
and Append
options both of
which are ambigous until the other is also set.
activateOptions
in interface OptionHandler
|
Log4j 1.3alpha-7 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |