Inherited by RollingFileAppenderSkeleton.
Support for java.io.Writer
and console appending has been deprecated and then removed. See the replacement solutions: WriterAppender and ConsoleAppender.
Public Member Functions | |
FileAppender () | |
The default constructor does not do anything. | |
FileAppender (const LayoutPtr &layout, const LogString &filename, bool append, bool bufferedIO, int bufferSize) | |
Instantiate a FileAppender and open the file designated by filename . | |
FileAppender (const LayoutPtr &layout, const LogString &filename, bool append) | |
Instantiate a FileAppender and open the file designated by filename . | |
FileAppender (const LayoutPtr &layout, const LogString &filename) | |
Instantiate a FileAppender and open the file designated by filename . | |
~FileAppender () | |
virtual void | setFile (const LogString &file) |
The File property takes a string value which should be the name of the file to append to. | |
virtual void | setFile (const LogString &file, bool append, bool bufferedIO, size_t bufferSize, log4cxx::helpers::Pool &p) |
Sets and opens the file where the log output will go. | |
bool | getAppend () const |
Returns the value of the Append option. | |
LogString | getFile () const |
Returns the value of the File option. | |
void | activateOptions (log4cxx::helpers::Pool &p) |
void | setOption (const LogString &option, const LogString &value) |
Set option to value . | |
bool | getBufferedIO () const |
Get the value of the BufferedIO option. | |
int | getBufferSize () const |
Get the size of the IO buffer. | |
void | setAppend (bool fileAppend1) |
The Append option takes a boolean value. | |
void | setBufferedIO (bool bufferedIO) |
The BufferedIO option takes a boolean value. | |
void | setBufferSize (int bufferSize1) |
Set the size of the IO buffer. | |
Static Public Member Functions | |
static LogString | stripDuplicateBackslashes (const LogString &name) |
Replaces double backslashes with single backslashes for compatibility with paths from earlier XML configurations files. | |
Protected Attributes | |
bool | fileAppend |
Append to or truncate the file? The default value for this variable is true , meaning that by default a FileAppender will append to an existing file and not truncate it. | |
LogString | fileName |
The name of the log file. | |
bool | bufferedIO |
Do we do bufferedIO? | |
int | bufferSize |
How big should the IO buffer be? Default is 8K. |
|
The default constructor does not do anything.
|
|
Instantiate a The opened filename will become the output destination for this appender.
If the
If the |
|
Instantiate a FileAppender and open the file designated by The opened filename will become the output destination for this appender.
If the |
|
Instantiate a FileAppender and open the file designated by The opened filename will become the output destination for this appender. 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 WriterAppender. Reimplemented in DailyRollingFileAppender, RollingFileAppenderSkeleton, and RollingFileAppender. |
|
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 WriterAppender. Reimplemented in DailyRollingFileAppender, and RollingFileAppender. |
|
Replaces double backslashes with single backslashes for compatibility with paths from earlier XML configurations files.
|
|
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.
|