| Modifier and Type | Field and Description |
|---|---|
| protected boolean | append
Append to or truncate the file? |
| private FileSize | |
| protected static String | |
| public static final long | |
| protected String | fileName
The name of the active log file. |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected boolean | |
| public String | |
| public boolean | |
| public boolean | |
| public void | |
| public final String | Returns: the value of the file propertyThis method is used by derived classes to obtain the raw file property. |
| private void | |
| private void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | setPrudent(boolean prudent)
When prudent is set to true, file appenders from multiple JVMs can safely write to the same file. |
| public void | start()
Overrides ch. Implements ch. null, then openFile
is called with the values of File and Append properties.
|
| public void | stop()
Overrides ch. Implements ch. |
| protected void |
| append | back to summary |
|---|---|
| protected boolean append Append to or truncate the file? The default value for this variable is
| |
| bufferSize | back to summary |
|---|---|
| private FileSize bufferSize | |
| COLLISION_WITH_EARLIER_APPENDER_URL | back to summary |
|---|---|
| protected static String COLLISION_WITH_EARLIER_APPENDER_URL | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| public static final long DEFAULT_BUFFER_SIZE | |
| fileName | back to summary |
|---|---|
| protected String fileName The name of the active log file. | |
| prudent | back to summary |
|---|---|
| private boolean prudent | |
| FileAppender | back to summary |
|---|---|
| public FileAppender() | |
| addErrorForCollision | back to summary |
|---|---|
| protected void addErrorForCollision(String optionName, String optionValue, String appenderName) | |
| checkForFileCollisionInPreviousFileAppenders | back to summary |
|---|---|
| protected boolean checkForFileCollisionInPreviousFileAppenders() | |
| getFile | back to summary |
|---|---|
| public String getFile() Returns the value of the File property. This method may be overridden by derived classes. | |
| isAppend | back to summary |
|---|---|
| public boolean isAppend() Returns the value of the Append property. | |
| isPrudent | back to summary |
|---|---|
public boolean isPrudent()
| |
| openFile | back to summary |
|---|---|
| public void openFile(String file_name) throws IOException Sets and opens the file where the log output will go. The specified file must be writable. If there was already an opened file, then the previous file is closed first. Do not use this method directly. To configure a FileAppender or one of its subclasses, set its properties one by one and then call start().
| |
| rawFileProperty | back to summary |
|---|---|
| public final String rawFileProperty() This method is used by derived classes to obtain the raw file property. Regular users should not be calling this method.
| |
| releaseFileLock | back to summary |
|---|---|
| private void releaseFileLock(FileLock fileLock) | |
| safeWriteBytes | back to summary |
|---|---|
| private void safeWriteBytes(byte[] byteArray) | |
| safeWriteOut | back to summary |
|---|---|
| private void safeWriteOut(E event) | |
| setAppend | back to summary |
|---|---|
| public void setAppend(boolean append) | |
| setBufferSize | back to summary |
|---|---|
| public void setBufferSize(FileSize bufferSize) | |
| setFile | back to summary |
|---|---|
| public void setFile(String file) The File property takes a string value which should be the name of the file to append to. | |
| setPrudent | back to summary |
|---|---|
| public void setPrudent(boolean prudent) When prudent is set to true, file appenders from multiple JVMs can safely write to the same file. | |
| start | back to summary |
|---|---|
| public void start() Overrides ch. Implements ch. If the value of File is not | |
| stop | back to summary |
|---|---|
| public void stop() Overrides ch. Implements ch. Doc from ch. Stop this appender instance. The underlying stream or writer is also closed. Stopped appenders cannot be reused.
| |
| writeOut | back to summary |
|---|---|
| protected void writeOut(E event) throws IOException Overrides ch.
| |