Inheritance diagram for FileAppender:
Public Member Functions | |
FileAppender () | |
FileAppender (const LayoutPtr &layout, const String &filename, bool append, bool bufferedIO, int bufferSize) | |
FileAppender (const LayoutPtr &layout, const String &filename, bool append) | |
FileAppender (const LayoutPtr &layout, const String &filename) | |
void | setFile (const String &file) |
void | setFile (const String &file, bool append, bool bufferedIO, int bufferSize) |
bool | getAppend () const |
const String & | getFile () const |
void | activateOptions () |
void | setOption (const String &option, const String &value) |
bool | getBufferedIO () const |
int | getBufferSize () const |
void | setAppend (bool fileAppend) |
void | setBufferedIO (bool bufferedIO) |
void | setBufferSize (int bufferSize) |
Protected Member Functions | |
virtual void | closeWriter () |
void | closeFile () |
Protected Attributes | |
bool | fileAppend |
String | fileName |
bool | bufferedIO |
int | bufferSize |
Support for java.io.Writer
and console appending has been deprecated and then removed. See the replacement solutions: WriterAppender and ConsoleAppender.
|
The default constructor does not do anything. |
|
Instantiate a
If the
If the |
|
Instantiate a FileAppender and open the file designated by
If the |
|
Instantiate a FileAppender and open the file designated by The file will be appended to. |
|
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. Reimplemented from AppenderSkeleton. Reimplemented in DailyRollingFileAppender. |
|
Closes the previously opened file. |
|
Closes the previously opened file. Implements WriterAppender. |
|
Returns the value of the Append option. |
|
Get the value of the BufferedIO option. BufferedIO will significatnly increase performance on heavily loaded systems. |
|
Get the size of the IO buffer. |
|
Returns the value of the File option. |
|
The Append option takes a boolean value. It is set to Note: Actual opening of the file is made when activateOptions is called, not when the options are set. |
|
The BufferedIO option takes a boolean value. It is set to BufferedIO will significantly increase performance on heavily loaded systems. |
|
Set the size of the IO buffer. |
|
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 activateOptions.
|
|
The File property takes a string value which should be the name of the file to append to. Note that the special values "System.out" or "System.err" are no longer honored. Note: Actual opening of the file is made when activateOptions is called, not when the options are set. |
|
Set The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called. Reimplemented from AppenderSkeleton. Reimplemented in DailyRollingFileAppender, and RollingFileAppender. |
|
Do we do bufferedIO? |
|
How big should the IO buffer be? Default is 8K. |
|
Append to or truncate the file? The default value for this variable is This option is meaningful only if the FileAppender opens the file. |
|
The name of the log file. |