Public Member Functions | |
RollingFileAppender () | |
RollingFileAppender (const LayoutPtr &layout, const String &fileName, bool append) | |
RollingFileAppender (const LayoutPtr &layout, const String &fileName) | |
int | getMaxBackupIndex () const |
long | getMaximumFileSize () const |
void | rollOver () |
void | setMaxBackupIndex (int maxBackupIndex) |
void | setMaxFileSize (const String &value) |
virtual void | setOption (const String &option, const String &value) |
Protected Member Functions | |
virtual void | subAppend (const spi::LoggingEventPtr &event) |
Protected Attributes | |
long | maxFileSize |
int | maxBackupIndex |
|
The default constructor simply calls its parents constructor. |
|
Instantiate a RollingFileAppender and open the file designated by
If the |
|
Instantiate a FileAppender and open the file designated by The file will be appended to. |
|
Returns the value of the MaxBackupIndex option. |
|
Get the maximum size that the output file is allowed to reach before being rolled over to backup files. |
|
Implements the usual roll over behaviour.
If
If |
|
Set the maximum number of backup files to keep around.
The MaxBackupIndex option determines how many backup files are kept before the oldest is erased. This option takes a positive integer value. If set to zero, then there will be no backup files and the log file will be truncated when it reaches |
|
Set the maximum size that the output file is allowed to reach before being rolled over to backup files. In configuration files, the MaxFileSize option takes an long integer in the range 0 - 2^63. You can specify the value with the suffixes "KB", "MB" or "GB" so that the integer is interpreted being expressed respectively in kilobytes, megabytes or gigabytes. For example, the value "10KB" will be interpreted as 10240. |
|
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 FileAppender. |
|
This method differentiates RollingFileAppender from its parent class. Reimplemented from WriterAppender. |
|
There is one backup file by default. |
|
The default maximum file size is 10MB. |