org.x4juli.handlers.rolling
Interface TriggeringPolicy

All Superinterfaces:
OptionHandler
All Known Implementing Classes:
FilterBasedTriggeringPolicy, NOPTriggeringPolicy, SizeBasedTriggeringPolicy, TimeBasedRollingPolicy

public interface TriggeringPolicy
extends 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.

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 Ceki Gülcü, Curt Arnold. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.

Since:
0.5
Author:
Boris Unckel

Method Summary
 boolean isTriggeringEvent(java.util.logging.Handler handler, ExtendedLogRecord record, java.lang.String filename, long fileLength)
          Determines if a rollover may be appropriate at this time.
 
Methods inherited from interface org.x4juli.global.spi.OptionHandler
activateOptions
 

Method Detail

isTriggeringEvent

public boolean isTriggeringEvent(java.util.logging.Handler handler,
                                 ExtendedLogRecord record,
                                 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:
handler - A reference to the handler.
record - A reference to the current record.
filename - The filename for the currently active log file.
fileLength - Length of the file in bytes.
Returns:
true if a rollover should occur.
Since:
0.5


${license_html}