Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
log4cpp::RollingFileAppender Class Reference

#include <RollingFileAppender.hh>

Inheritance diagram for log4cpp::RollingFileAppender:
Inheritance graph
[legend]

Public Member Functions

virtual unsigned int getMaxBackupIndex () const
 
virtual size_t getMaxFileSize () const
 
 RollingFileAppender (const std::string &name, const std::string &fileName, size_t maxFileSize=10 *1024 *1024, unsigned int maxBackupIndex=1, bool append=true, mode_t mode=00644)
 
virtual void rollOver ()
 
virtual void setMaxBackupIndex (unsigned int maxBackups)
 
virtual void setMaximumFileSize (size_t maxFileSize)
 
- Public Member Functions inherited from log4cpp::FileAppender
virtual void close ()
 
 FileAppender (const std::string &name, const std::string &fileName, bool append=true, mode_t mode=00644)
 
 FileAppender (const std::string &name, int fd)
 
virtual bool getAppend () const
 
virtual mode_t getMode () const
 
virtual bool reopen ()
 
virtual void setAppend (bool append)
 
virtual void setMode (mode_t mode)
 
virtual ~FileAppender ()
 
- Public Member Functions inherited from log4cpp::LayoutAppender
 LayoutAppender (const std::string &name)
 
virtual bool requiresLayout () const
 
virtual void setLayout (Layout *layout=NULL)
 
virtual ~LayoutAppender ()
 
- Public Member Functions inherited from log4cpp::AppenderSkeleton
virtual void doAppend (const LoggingEvent &event)
 
virtual FiltergetFilter ()
 
virtual Priority::Value getThreshold ()
 
virtual void setFilter (Filter *filter)
 
virtual void setThreshold (Priority::Value priority)
 
virtual ~AppenderSkeleton ()
 
- Public Member Functions inherited from log4cpp::Appender
const std::string & getName () const
 
virtual ~Appender ()
 

Protected Member Functions

virtual void _append (const LoggingEvent &event)
 
- Protected Member Functions inherited from log4cpp::LayoutAppender
Layout_getLayout ()
 
- Protected Member Functions inherited from log4cpp::AppenderSkeleton
 AppenderSkeleton (const std::string &name)
 
- Protected Member Functions inherited from log4cpp::Appender
 Appender (const std::string &name)
 

Protected Attributes

unsigned int _maxBackupIndex
 
unsigned short int _maxBackupIndexWidth
 
size_t _maxFileSize
 
- Protected Attributes inherited from log4cpp::FileAppender
int _fd
 
const std::string _fileName
 
int _flags
 
mode_t _mode
 

Additional Inherited Members

- Public Types inherited from log4cpp::LayoutAppender
typedef BasicLayout DefaultLayoutType
 
- Static Public Member Functions inherited from log4cpp::Appender
static void closeAll ()
 
static AppendergetAppender (const std::string &name)
 
static bool reopenAll ()
 

Detailed Description

RollingFileAppender is a FileAppender that rolls over the logfile once it has reached a certain size limit.

Since
0.3.1

Definition at line 22 of file RollingFileAppender.hh.

Constructor & Destructor Documentation

log4cpp::RollingFileAppender::RollingFileAppender ( const std::string &  name,
const std::string &  fileName,
size_t  maxFileSize = 10*1024*1024,
unsigned int  maxBackupIndex = 1,
bool  append = true,
mode_t  mode = 00644 
)

Definition at line 32 of file RollingFileAppender.cpp.

Member Function Documentation

void log4cpp::RollingFileAppender::_append ( const LoggingEvent event)
protectedvirtual

Log in Appender specific way. Subclasses of Appender should implement this method to perform actual logging.

Parameters
eventThe LoggingEvent to log.

Reimplemented from log4cpp::FileAppender.

Definition at line 84 of file RollingFileAppender.cpp.

unsigned int log4cpp::RollingFileAppender::getMaxBackupIndex ( ) const
virtual

Definition at line 49 of file RollingFileAppender.cpp.

size_t log4cpp::RollingFileAppender::getMaxFileSize ( ) const
virtual

Definition at line 57 of file RollingFileAppender.cpp.

void log4cpp::RollingFileAppender::rollOver ( )
virtual

Definition at line 61 of file RollingFileAppender.cpp.

void log4cpp::RollingFileAppender::setMaxBackupIndex ( unsigned int  maxBackups)
virtual

Definition at line 44 of file RollingFileAppender.cpp.

void log4cpp::RollingFileAppender::setMaximumFileSize ( size_t  maxFileSize)
virtual

Definition at line 53 of file RollingFileAppender.cpp.

Member Data Documentation

unsigned int log4cpp::RollingFileAppender::_maxBackupIndex
protected

Definition at line 41 of file RollingFileAppender.hh.

unsigned short int log4cpp::RollingFileAppender::_maxBackupIndexWidth
protected

Definition at line 42 of file RollingFileAppender.hh.

size_t log4cpp::RollingFileAppender::_maxFileSize
protected

Definition at line 44 of file RollingFileAppender.hh.


The documentation for this class was generated from the following files:


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:10:00