Interface RotateStrategy

All Known Implementing Classes:
OrRotateStrategy, RotateStrategyByDate, RotateStrategyBySize, RotateStrategyByTime, RotateStrategyByTimeOfDay

public interface RotateStrategy

Strategy that checks condition under which file rotation is needed.

Leo Sutic, Bernhard Huber

Method Summary
 boolean isRotationNeeded(java.lang.String data, file)
          Check if a log rotation is neccessary at this time.
 void reset()
          Reset cumulative rotation history data.

Method Detail


public void reset()
Reset cumulative rotation history data. Called after rotation.


public boolean isRotationNeeded(java.lang.String data,
Check if a log rotation is neccessary at this time.

data - the serialized version of the message about to be written to the log system
file - the File that we are writing to
boolean return true if log rotation is neccessary, else false

Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.