org.apache.log.output.io.rotate
Class OrRotateStrategy
java.lang.Objectorg.apache.log.output.io.rotate.OrRotateStrategy
- RotateStrategy
public class OrRotateStrategy
extends java.lang.Object
Hierarchical rotation strategy.
This object is initialised with several rotation strategy objects.
The isRotationNeeded method checks the first rotation
strategy object. If a rotation is needed, this result is returned.
If not, the next rotation strategy object is checked, and so on.
boolean | isRotationNeeded(String data, File file)- check if now a log rotation is neccessary.
|
void | reset()- reset.
|
OrRotateStrategy
public OrRotateStrategy(RotateStrategy[] strategies)
Constructor
strategies - the set of rotation strategies
isRotationNeeded
public boolean isRotationNeeded(String data,
File file) check if now a log rotation is neccessary.
This object is initialised with several rotation strategy objects.
The isRotationNeeded method checks the first rotation
strategy object. If a rotation is needed, this result is returned.
If not the next rotation strategy object is asked and so on.
- isRotationNeeded in interface RotateStrategy
data - the last message written to the log systemfile - ???
- boolean return true if log rotation is neccessary, else false