18#if !defined(_LOG4CXX_ROLLING_ROLLING_FILE_APPENDER_H)
19#define _LOG4CXX_ROLLING_ROLLING_FILE_APPENDER_H
87 struct RollingFileAppenderPriv;
225 helpers::WriterPtr
createWriter(helpers::OutputStreamPtr& os)
override;
FileAppender appends log events to a file.
Definition: fileappender.h:42
RollingFileAppender extends log4cxx::FileAppender to backup the log files depending on RollingPolicy ...
Definition: rollingfileappender.h:80
void setTriggeringPolicy(const TriggeringPolicyPtr &policy)
Use policy to determine when to trigger a log file rollover.
size_t getMaximumFileSize() const
Get the maximum size that the output file is allowed to reach before being rolled over to backup file...
void setMaximumFileSize(size_t value)
void close() override
Close appender.
void incrementFileLength(size_t increment)
Increments estimated byte length of current active log file.
bool rollover(log4cxx::helpers::Pool &p)
Implements the configured roll over behaviour.
void subAppend(const spi::LoggingEventPtr &event, helpers::Pool &p) override
Actual writing occurs here.
TriggeringPolicyPtr getTriggeringPolicy() const
The policy that determine when to trigger a log file rollover.
bool rolloverInternal(log4cxx::helpers::Pool &p)
void setRollingPolicy(const RollingPolicyPtr &policy)
Use policy as the scheme for rolling over log files.
LogString makeFileNamePattern(const LogString &datePattern)
size_t getFileLength() const
Get byte length of current active log file.
void setMaxBackupIndex(int maxBackupIndex)
Set the maximum number of backup files to keep around.
RollingPolicyPtr getRollingPolicy() const
The policy that implements the scheme for rolling over a log file.
helpers::WriterPtr createWriter(helpers::OutputStreamPtr &os) override
Returns an OutputStreamWriter when passed an OutputStream.
void setMaxFileSize(const LogString &value)
Set the maximum size that the output file is allowed to reach before being rolled over to backup file...
void setOption(const LogString &option, const LogString &value) override
Set option to value.
void setDatePattern(const LogString &pattern)
The DatePattern takes a string in the same format as expected by SimpleDateFormat.
void activateOptions(helpers::Pool &pool) override
Activate the options that were previously set with calls to option setters.
int getMaxBackupIndex() const
Returns the value of the MaxBackupIndex option.
#define LOG4CXX_EXPORT
Definition: log4cxx.h:101
#define LOG4CXX_PTR_DEF(T)
Definition: log4cxx.h:64
#define LOG4CXX_NS
Definition: log4cxx.h:104
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:32
std::basic_string< logchar > LogString
Definition: logstring.h:60
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:158
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:152
#define DECLARE_LOG4CXX_OBJECT(object)
Definition: object.h:43
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition: object.h:164
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:146