RotateStrategypublic class RotateStrategyByTimeOfDay extends java.lang.Object implements RotateStrategy
| Modifier and Type | Field | 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 | Description |
|---|---|
RotateStrategyByTimeOfDay() |
Rotate logs at specific time of day.
|
RotateStrategyByTimeOfDay(long time) |
Rotate logs at specific time of day.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
isRotationNeeded(java.lang.String data,
java.io.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 RotateStrategypublic boolean isRotationNeeded(java.lang.String data,
java.io.File file)
isRotationNeeded in interface RotateStrategydata - the last message written to the log systemfile - not usedCopyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.