public class RotateStrategyByTime extends Object implements RotateStrategy
| Constructor and Description |
|---|
RotateStrategyByTime()
Rotate logs by time.
|
RotateStrategyByTime(long timeInterval)
Rotate logs by time.
|
| 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.
|
public RotateStrategyByTime()
public RotateStrategyByTime(long timeInterval)
timeInterval - rotate before time-interval [ms] has expiredpublic void reset()
reset in interface RotateStrategypublic boolean isRotationNeeded(String data, File file)
(current_time - m_startingTime) / m_timeInterval > m_currentRotation
rotation is needed.isRotationNeeded in interface RotateStrategydata - the last message written to the log systemfile - not usedCopyright © 1997–2019. All rights reserved.