Inherited by DailyRollingFileAppender, RollingFileAppender, and RollingFileAppender.
Public Member Functions | |
RollingFileAppenderSkeleton () | |
The default constructor simply calls its parents constructor. | |
void | activateOptions (log4cxx::helpers::Pool &) |
bool | rollover (log4cxx::helpers::Pool &p) |
Implements the usual roll over behaviour. | |
void | close () |
Close appender. | |
size_t | getFileLength () const |
Get byte length of current active log file. | |
void | incrementFileLength (size_t increment) |
Increments estimated byte length of current active log file. | |
Protected Member Functions | |
virtual void | subAppend (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) |
Actual writing occurs here. | |
RollingPolicyPtr | getRollingPolicy () const |
TriggeringPolicyPtr | getTriggeringPolicy () const |
void | setRollingPolicy (const RollingPolicyPtr &policy) |
Sets the rolling policy. | |
void | setTriggeringPolicy (const TriggeringPolicyPtr &policy) |
log4cxx::helpers::WriterPtr | createWriter (log4cxx::helpers::OutputStreamPtr &os) |
Returns an OutputStreamWriter when passed an OutputStream. |
The default constructor simply calls its parents constructor.
void activateOptions | ( | log4cxx::helpers::Pool & | ) | [virtual] |
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 FileAppender.
Reimplemented in DailyRollingFileAppender, and RollingFileAppender.
bool rollover | ( | log4cxx::helpers::Pool & | p | ) |
Implements the usual roll over behaviour.
If MaxBackupIndex
is positive, then files {File.1
, ..., File.MaxBackupIndex -1
} are renamed to {File.2
, ..., File.MaxBackupIndex
}. Moreover, File
is renamed File.1
and closed. A new File
is created to receive further log output.
If MaxBackupIndex
is equal to zero, then the File
is truncated with no backup files created.
virtual void subAppend | ( | const spi::LoggingEventPtr & | event, | |
log4cxx::helpers::Pool & | p | |||
) | [protected, virtual] |
RollingPolicyPtr getRollingPolicy | ( | ) | const [protected] |
TriggeringPolicyPtr getTriggeringPolicy | ( | ) | const [protected] |
void setRollingPolicy | ( | const RollingPolicyPtr & | policy | ) | [protected] |
Sets the rolling policy.
In case the 'policy' argument also implements TriggeringPolicy, then the triggering policy for this appender is automatically set to be the policy argument.
policy |
void setTriggeringPolicy | ( | const TriggeringPolicyPtr & | policy | ) | [protected] |
void close | ( | ) | [virtual] |
Close appender.
Waits for any asynchronous file compression actions to be completed.
Reimplemented from WriterAppender.
log4cxx::helpers::WriterPtr createWriter | ( | log4cxx::helpers::OutputStreamPtr & | os | ) | [protected, virtual] |
Returns an OutputStreamWriter when passed an OutputStream.
The encoding used will depend on the value of the encoding
property. If the encoding value is specified incorrectly the writer will be opened using the default system encoding (an error message will be printed to the loglog.
os | output stream, may not be null. |
Reimplemented from WriterAppender.
size_t getFileLength | ( | ) | const |
Get byte length of current active log file.
void incrementFileLength | ( | size_t | increment | ) |
Increments estimated byte length of current active log file.
increment | additional bytes written to log file. |