| java.lang.Object org.apache.log.output.io.rotate.RevolvingFileStrategy
RevolvingFileStrategy | public class RevolvingFileStrategy implements FileStrategy(Code) | | strategy for naming log files based on appending revolving suffix.
If the initial rotation is not specified then the class will attempt to
calculate the rotation number via the following algorithm.
It will search for the file with the highest number in the rotation. It will
then increment its rotation number and use that number. If all files in rotation
are present then it will then set the initial rotation to the next rotation after
the most recently created file.
author: Avalon Development Team author: Bernhard Huber author: Peter Donald author: David Gray |
Constructor Summary | |
public | RevolvingFileStrategy(File baseFile, int maxRotations) Creation of a new instane ofthe revolving file strategy. | public | RevolvingFileStrategy(File baseFile, int initialRotation, int maxRotations) Creation of a new instane ofthe revolving file strategy. |
Method Summary | |
public int | getCurrentRotation() Retrieve the current rotation number. | public File | nextFile() Calculate the real file name from the base filename. |
RevolvingFileStrategy | public RevolvingFileStrategy(File baseFile, int maxRotations)(Code) | | Creation of a new instane ofthe revolving file strategy.
Parameters: baseFile - the base file Parameters: maxRotations - the maximum number of rotations ?? |
RevolvingFileStrategy | public RevolvingFileStrategy(File baseFile, int initialRotation, int maxRotations)(Code) | | Creation of a new instane ofthe revolving file strategy.
Parameters: baseFile - the base file Parameters: initialRotation - the number of initial rotations ?? Parameters: maxRotations - the maximum number of rotations?? |
getCurrentRotation | public int getCurrentRotation()(Code) | | Retrieve the current rotation number.
the current rotation number. |
nextFile | public File nextFile()(Code) | | Calculate the real file name from the base filename.
File the calculated file name |
|
|