|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log.output.io.rotate.RotateStrategyBySize
Rotation strategy based on size written to log file. The strategy will signal that a rotation is needed if the size goes above a set limit. Due to performance reasons the limit is not strictly enforced, however, the strategy has at most an error of the longest single data message written to the logging system. The error will occur immediately after a rotation, when the strategy is reset and the data that triggered the rotation is written. The strategy's internal counter will then be off with data.length() bytes.
Constructor Summary | |
RotateStrategyBySize()
Rotate logs by size. |
|
RotateStrategyBySize(long maxSize)
Rotate logs by size. |
Method Summary | |
boolean |
isRotationNeeded(java.lang.String data,
java.io.File file)
Check if now a log rotation is neccessary. |
void |
reset()
Reset log size written so far. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RotateStrategyBySize()
public RotateStrategyBySize(long maxSize)
maxSize
- rotate before writing maxSize [byte] of messagesMethod Detail |
public void reset()
reset
in interface RotateStrategy
public boolean isRotationNeeded(java.lang.String data, java.io.File file)
isRotationNeeded
in interface RotateStrategy
data
- the message about to be written to the log systemfile
- not used
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |