org.apache.log.output.io.rotate
public class RotateStrategyByTime extends Object implements RotateStrategy
Field Summary | |
---|---|
long | m_currentRotation |
long | m_startingTime |
long | m_timeInterval |
Constructor Summary | |
---|---|
RotateStrategyByTime()
Rotate logs by time.
| |
RotateStrategyByTime(long timeInterval)
Rotate logs by time.
|
Method Summary | |
---|---|
boolean | isRotationNeeded(String data, File file)
Check if now a log rotation is neccessary.
|
void | reset()
reset interval history counters. |
Parameters: timeInterval rotate before time-interval [ms] has expired
(current_time - m_startingTime) / m_timeInterval > m_currentRotation
rotation is needed.
Parameters: data the last message written to the log system file not used
Returns: boolean return true if log rotation is neccessary, else false