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
Modifier and Type | Field and Description |
---|---|
private File |
m_baseFile |
private SimpleDateFormat |
m_formatter |
private String |
m_suffix |
Constructor and Description |
---|
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 ??
|
private File m_baseFile
private SimpleDateFormat m_formatter
private String m_suffix
public UniqueFileStrategy(File baseFile)
baseFile
- the base filepublic UniqueFileStrategy(File baseFile, String pattern)
baseFile
- the base filepattern
- the format patternpublic File nextFile()
nextFile
in interface FileStrategy
Copyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.