org.apache.log.output.io.rotate
Class RotateStrategyBySize
java.lang.Object
|
+--org.apache.log.output.io.rotate.RotateStrategyBySize
- All Implemented Interfaces:
- RotateStrategy
- public class RotateStrategyBySize
- extends Object
- implements RotateStrategy
Rotation stragety based on size written to log file.
- Author:
- Bernhard Huber
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RotateStrategyBySize
public RotateStrategyBySize()
- Rotate logs by size.
By default do log rotation before writing approx. 1MB of messages
RotateStrategyBySize
public RotateStrategyBySize(long maxSize)
- Rotate logs by size.
- Parameters:
maxSize
- rotate before writing maxSize [byte] of messages
reset
public void reset()
- reset log size written so far.
- Specified by:
reset
in interface RotateStrategy
isRotationNeeded
public boolean isRotationNeeded(String data,
File file)
- Check if now a log rotation is neccessary.
- Specified by:
isRotationNeeded
in interface RotateStrategy
- Parameters:
data
- the last message written to the log system- Returns:
- boolean return true if log rotation is neccessary, else false
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.