| java.lang.Object org.apache.log.output.io.rotate.UniqueFileStrategy
UniqueFileStrategy | public class UniqueFileStrategy implements FileStrategy(Code) | | Strategy for naming log files based on appending time suffix.
A file name can be based on simply appending the number of miliseconds
since (not really sure) 1/1/1970.
Other constructors accept a pattern of a SimpleDateFormat
to form the appended string to the base file name as well as a suffix
which should be appended last.
A new UniqueFileStrategy( new File( "foo." ), "yyyy-MM-dd", ".log" )
object will return File objects with file names like
foo.2001-12-24.log
author: Bernhard Huber author: Giacomo Pati |
Method Summary | |
public File | nextFile() Calculate the real file name from the base filename. |
UniqueFileStrategy | public UniqueFileStrategy(File baseFile)(Code) | | Creation of a new Unique File Strategy ??
Parameters: baseFile - the base file |
UniqueFileStrategy | public UniqueFileStrategy(File baseFile, String pattern)(Code) | | Creation of a new Unique File Strategy ??
Parameters: baseFile - the base file Parameters: pattern - the format pattern |
UniqueFileStrategy | public UniqueFileStrategy(File baseFile, String pattern, String suffix)(Code) | | Creation of a new Unique File Strategy ??
Parameters: baseFile - the base file Parameters: pattern - the format pattern Parameters: suffix - the suffix ?? |
nextFile | public File nextFile()(Code) | | Calculate the real file name from the base filename.
File the calculated file name |
|
|