org.apache.log4j.rolling
Interface TriggeringPolicy
- All Superinterfaces:
- org.apache.log4j.spi.OptionHandler
- All Known Implementing Classes:
- FilterBasedTriggeringPolicy, SizeBasedTriggeringPolicy, TimeBasedRollingPolicy
public interface TriggeringPolicy
- extends org.apache.log4j.spi.OptionHandler
A TriggeringPolicy
controls the conditions under which rollover
occurs. Such conditions include time of day, file size, an
external event, the log request or a combination thereof.
- Author:
- Ceki Gülcü, Curt Arnold
Method Summary |
boolean |
isTriggeringEvent(org.apache.log4j.Appender appender,
org.apache.log4j.spi.LoggingEvent event,
java.lang.String filename,
long fileLength)
Determines if a rollover may be appropriate at this time. |
Methods inherited from interface org.apache.log4j.spi.OptionHandler |
activateOptions |
isTriggeringEvent
boolean isTriggeringEvent(org.apache.log4j.Appender appender,
org.apache.log4j.spi.LoggingEvent event,
java.lang.String filename,
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.
- Parameters:
appender
- A reference to the appender.event
- A reference to the currently event.filename
- The filename for the currently active log file.fileLength
- Length of the file in bytes.
- Returns:
- true if a rollover should occur.
Copyright © 2007 Apache Software Foundation. All Rights Reserved.