org.apache.log.output.io.rotate
Class RotateStrategyByDate

java.lang.Object
  extended by org.apache.log.output.io.rotate.RotateStrategyByDate
All Implemented Interfaces:
RotateStrategy

public class RotateStrategyByDate
extends java.lang.Object
implements RotateStrategy

Rotation stragety based on SimpleDateFormat.

Version:
$Id: RotateStrategyByDate.java 506267 2007-02-12 04:06:06Z crossley $
Author:
Avalon Development Team, Eung-ju Park

Field Summary
private  java.lang.String m_current
           
private  java.util.Date m_date
           
private  java.text.SimpleDateFormat m_format
           
 
Constructor Summary
RotateStrategyByDate()
          Creation of a new rotation strategy based on a date policy.
RotateStrategyByDate(java.lang.String pattern)
          Creation of a new rotation strategy based on a date policy using a supplied pattern.
 
Method Summary
 boolean isRotationNeeded(java.lang.String data, java.io.File file)
          Test is a rotation is required.
 void reset()
          Reset the strategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_format

private java.text.SimpleDateFormat m_format

m_date

private java.util.Date m_date

m_current

private java.lang.String m_current
Constructor Detail

RotateStrategyByDate

public RotateStrategyByDate()
Creation of a new rotation strategy based on a date policy.


RotateStrategyByDate

public RotateStrategyByDate(java.lang.String pattern)
Creation of a new rotation strategy based on a date policy using a supplied pattern.

Parameters:
pattern - the message formatting pattern
Method Detail

reset

public void reset()
Reset the strategy.

Specified by:
reset in interface RotateStrategy

isRotationNeeded

public boolean isRotationNeeded(java.lang.String data,
                                java.io.File file)
Test is a rotation is required. Documentation pending ??

Specified by:
isRotationNeeded in interface RotateStrategy
Parameters:
data - not used
file - not used
Returns:
TRUE if a rotation is required else FALSE