org.apache.logging.log4j.core.appender.rolling
Interface TriggeringPolicy

All Known Implementing Classes:
CompositeTriggeringPolicy, OnStartupTriggeringPolicy, SizeBasedTriggeringPolicy, TimeBasedTriggeringPolicy

public interface TriggeringPolicy

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.


Method Summary
 void initialize(RollingFileManager manager)
          Initialize the Policy.
 boolean isTriggeringEvent(LogEvent event)
          Determines if a rollover may be appropriate at this time.
 

Method Detail

initialize

void initialize(RollingFileManager manager)
Initialize the Policy.

Parameters:
manager - The RollingFileManager.

isTriggeringEvent

boolean isTriggeringEvent(LogEvent event)
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:
event - A reference to the currently event.
Returns:
true if a rollover should occur.


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.