log4cplus_RollingFileAppender(3)
| log4cplus::RollingFileAppender(3) | log4cplus | log4cplus::RollingFileAppender(3) |
NAME
log4cplus::RollingFileAppender - RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.
SYNOPSIS
#include <fileappender.h>
Inherits log4cplus::FileAppender.
Public Member Functions
RollingFileAppender (const log4cplus::tstring
&filename, long maxFileSize=10 *1024 *1024, int
maxBackupIndex=1, bool immediateFlush=true, bool
createDirs=false)
RollingFileAppender (const log4cplus::helpers::Properties
&properties)
virtual ~RollingFileAppender ()
Protected Member Functions
virtual void append (const spi::InternalLoggingEvent
&event)
Subclasses of Appender should implement this method to perform
actual logging. void rollover (bool alreadyLocked=false)
Protected Attributes
long maxFileSize
int maxBackupIndex
Additional Inherited Members
Detailed Description
RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.
Properties
Properties additional to FileAppender's properties:
- MaxFileSize
- This property specifies maximal size of output file. The value is in bytes. It is possible to use MB and KB suffixes to specify the value in megabytes or kilobytes instead.
- MaxBackupIndex
- This property limits the number of backup output files; e.g. how many log.1, log.2 etc. files will be kept.
Definition at line 242 of file fileappender.h.
Constructor & Destructor Documentation
log4cplus::RollingFileAppender::RollingFileAppender (const log4cplus::tstring & filename, long maxFileSize = 10 *1024 *1024, int maxBackupIndex = 1, bool immediateFlush = true, bool createDirs = false)
log4cplus::RollingFileAppender::RollingFileAppender (const log4cplus::helpers::Properties & properties)
virtual log4cplus::RollingFileAppender::~RollingFileAppender () [virtual]
Member Function Documentation
virtual void log4cplus::RollingFileAppender::append (const spi::InternalLoggingEvent & event) [protected], [virtual]
Subclasses of Appender should implement this method to perform actual logging.
See also
Reimplemented from log4cplus::FileAppenderBase.
void log4cplus::RollingFileAppender::rollover (bool alreadyLocked = false) [protected]
Member Data Documentation
int log4cplus::RollingFileAppender::maxBackupIndex [protected]
Definition at line 261 of file fileappender.h.
long log4cplus::RollingFileAppender::maxFileSize [protected]
Definition at line 260 of file fileappender.h.
Author
Generated automatically by Doxygen for log4cplus from the source code.
| Fri Jun 18 2021 | Version 2.0.6 |
