RollingFileAppender extends FileAppender to backup the log files when they reach a certain size. More...
Inherits log4cxx::rolling::RollingFileAppenderSkeleton.
Public Member Functions | |
virtual const helpers::Class & | getClass () const |
const void * | cast (const helpers::Class &clazz) const |
bool | instanceof (const helpers::Class &clazz) const |
RollingFileAppender () | |
The default constructor simply calls its parents constructor. | |
RollingFileAppender (const LayoutPtr &layout, const LogString &fileName, bool append) | |
Instantiate a RollingFileAppender and open the file designated by filename . | |
RollingFileAppender (const LayoutPtr &layout, const LogString &fileName) | |
Instantiate a FileAppender and open the file designated by filename . | |
virtual | ~RollingFileAppender () |
int | getMaxBackupIndex () const |
Returns the value of the MaxBackupIndex option. | |
long | getMaximumFileSize () const |
Get the maximum size that the output file is allowed to reach before being rolled over to backup files. | |
void | setMaxBackupIndex (int maxBackupIndex) |
Set the maximum number of backup files to keep around. | |
void | setMaxFileSize (const LogString &value) |
Set the maximum size that the output file is allowed to reach before being rolled over to backup files. | |
void | setMaximumFileSize (int value) |
virtual void | setOption (const LogString &option, const LogString &value) |
void | activateOptions (log4cxx::helpers::Pool &pool) |
Prepares RollingFileAppender for use. | |
Static Public Member Functions | |
static const helpers::Class & | getStaticClass () |
static const log4cxx::helpers::ClassRegistration & | registerClass () |
RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.
The default constructor simply calls its parents constructor.
RollingFileAppender | ( | const LayoutPtr & | layout, | |
const LogString & | fileName, | |||
bool | append | |||
) |
Instantiate a RollingFileAppender and open the file designated by filename
.
The opened filename will become the ouput destination for this appender.
If the append
parameter is true, the file will be appended to. Otherwise, the file desginated by filename
will be truncated before being opened.
RollingFileAppender | ( | const LayoutPtr & | layout, | |
const LogString & | fileName | |||
) |
Instantiate a FileAppender and open the file designated by filename
.
The opened filename will become the output destination for this appender.
The file will be appended to.
virtual ~RollingFileAppender | ( | ) | [virtual] |
void activateOptions | ( | log4cxx::helpers::Pool & | pool | ) | [virtual] |
Prepares RollingFileAppender for use.
Reimplemented from RollingFileAppenderSkeleton.
const void* cast | ( | const helpers::Class & | clazz | ) | const [inline, virtual] |
Reimplemented from RollingFileAppenderSkeleton.
virtual const helpers::Class& getClass | ( | ) | const [virtual] |
Reimplemented from RollingFileAppenderSkeleton.
int getMaxBackupIndex | ( | ) | const |
Returns the value of the MaxBackupIndex option.
long getMaximumFileSize | ( | ) | const |
Get the maximum size that the output file is allowed to reach before being rolled over to backup files.
static const helpers::Class& getStaticClass | ( | ) | [static] |
Reimplemented from RollingFileAppenderSkeleton.
bool instanceof | ( | const helpers::Class & | clazz | ) | const [inline, virtual] |
Reimplemented from RollingFileAppenderSkeleton.
static const log4cxx::helpers::ClassRegistration& registerClass | ( | ) | [static] |
Reimplemented from RollingFileAppenderSkeleton.
void setMaxBackupIndex | ( | int | maxBackupIndex | ) |
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 MaxFileSize
.
void setMaxFileSize | ( | const LogString & | value | ) |
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.
void setMaximumFileSize | ( | int | value | ) |
Reimplemented from FileAppender.