|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.log4j.rolling.FilterBasedTriggeringPolicy
public final class 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()
|
void |
addFilter(org.apache.log4j.spi.Filter newFilter)
Add a filter to end of the filter list. |
void |
clearFilters()
Clear the filters chain. |
org.apache.log4j.spi.Filter |
getFilter()
Returns the head Filter. |
boolean |
isTriggeringEvent(org.apache.log4j.Appender appender,
org.apache.log4j.spi.LoggingEvent event,
java.lang.String file,
long fileLength)
Determines if a rollover may be appropriate at this time. |
boolean |
isTriggeringEvent(org.apache.log4j.spi.LoggingEvent event)
|
boolean |
parseUnrecognizedElement(org.w3c.dom.Element element,
java.util.Properties props)
Called to inform a configured object when an unrecognized child element is encountered. |
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(org.apache.log4j.spi.LoggingEvent event)
isTriggeringEvent
in interface org.apache.log4j.spi.TriggeringEventEvaluator
public boolean isTriggeringEvent(org.apache.log4j.Appender appender, org.apache.log4j.spi.LoggingEvent event, java.lang.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(org.apache.log4j.spi.Filter newFilter)
newFilter
- filter to add to end of list.public void clearFilters()
public org.apache.log4j.spi.Filter getFilter()
public void activateOptions()
activateOptions
in interface org.apache.log4j.spi.OptionHandler
public boolean parseUnrecognizedElement(org.w3c.dom.Element element, java.util.Properties props) throws java.lang.Exception
parseUnrecognizedElement
in interface UnrecognizedElementHandler
element
- element, may not be null.props
- properties in force, may be null.
java.lang.Exception
- throw an exception to prevent activation
of the configured object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010 The Apache Software Foundation. Licensed under the Apache License, Version 2.0
Apache Extras Companion for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.