org.apache.log.output.io.rotate
public class RotateStrategyByTimeOfDay extends Object implements RotateStrategy
Modifier and Type | Field and Description |
---|---|
private long |
m_currentRotation
Time in ms that the current rotation started.
|
private static long |
TIME_24_HOURS
Constant that stores the the number of ms in 24 hours.
|
Constructor and Description |
---|
RotateStrategyByTimeOfDay()
Rotate logs at specific time of day.
|
RotateStrategyByTimeOfDay(long time)
Rotate logs at specific time of day.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRotationNeeded(String data,
File file)
Check if now a log rotation is neccessary.
|
void |
reset()
reset interval history counters.
|
private static final long TIME_24_HOURS
private long m_currentRotation
public RotateStrategyByTimeOfDay()
public RotateStrategyByTimeOfDay(long time)
time
- Offset in milliseconds into the day to perform the log rotation.public void reset()
reset
in interface RotateStrategy
public boolean isRotationNeeded(String data, File file)
isRotationNeeded
in interface RotateStrategy
data
- the last message written to the log systemfile
- not usedCopyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.