public class FileAppender extends Appender
| Modifier | Constructor and Description |
|---|---|
|
FileAppender(java.lang.String baseName) |
protected |
FileAppender(XmlFile xml,
java.lang.String key)
Constructor which reads its configuration from the given XmlFile using the given key.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBufferSize()
Get current buffer size.
|
java.lang.String |
getCurrentfileName()
get the current file name.
|
java.lang.String |
getDateFormat()
Get the current date format.
|
java.lang.String |
getExtension()
Get the current log file extension.
|
java.lang.String |
getKey()
Identify the logger.
|
boolean |
isAppend()
Get the append value.
|
protected void |
nextFile()
Compose the new file name using the current date and open the stream.
|
void |
setAppend(boolean append)
Set the log file append mode.
|
void |
setBufferSize(int bufferSize)
Set the bufferSize.
|
void |
setDateFormat(java.lang.String dateFormat)
Set the date format to extend the log file.
|
void |
setExtension(java.lang.String extension)
Set th log file extension.
|
java.lang.String |
toString()
Developer friendly toString().
|
dontRemove, flush, writepublic FileAppender(java.lang.String baseName)
protected FileAppender(XmlFile xml, java.lang.String key)
xml - the XmlFilekey - the key to the FileAppenders section.public void setDateFormat(java.lang.String dateFormat)
dateFormat2 - protected void nextFile()
public java.lang.String getKey()
public boolean isAppend()
setAppend(boolean)public void setAppend(boolean append)
append - true if the log file is appended.isAppend()public int getBufferSize()
setBufferSize(int)public void setBufferSize(int bufferSize)
bufferSize - the new buffer size.getBufferSize()public java.lang.String getExtension()
setExtension(String)public void setExtension(java.lang.String extension)
extension - the log file extensiongetExtension()public java.lang.String getDateFormat()
public java.lang.String getCurrentfileName()