org.apache.log.output.io.rotate
public class UniqueFileStrategy extends Object implements FileStrategy
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
Field Summary | |
---|---|
File | m_baseFile |
SimpleDateFormat | m_formatter |
String | m_suffix |
Constructor Summary | |
---|---|
UniqueFileStrategy(File baseFile)
Creation of a new Unique File Strategy ? | |
UniqueFileStrategy(File baseFile, String pattern)
Creation of a new Unique File Strategy ? | |
UniqueFileStrategy(File baseFile, String pattern, String suffix)
Creation of a new Unique File Strategy ? |
Method Summary | |
---|---|
File | nextFile()
Calculate the real file name from the base filename.
|
Parameters: baseFile the base file
Parameters: baseFile the base file pattern the format pattern
Parameters: baseFile the base file pattern the format pattern suffix the suffix ??
Returns: File the calculated file name