Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef _LOG4CPP_ROLLINGFILEAPPENDER_HH
00008 #define _LOG4CPP_ROLLINGFILEAPPENDER_HH
00009
00010 #include <log4cpp/Portability.hh>
00011 #include <log4cpp/FileAppender.hh>
00012 #include <string>
00013 #include <stdarg.h>
00014
00015 namespace log4cpp {
00016
00022 class LOG4CPP_EXPORT RollingFileAppender : public FileAppender {
00023 public:
00024 RollingFileAppender(const std::string& name,
00025 const std::string& fileName,
00026 size_t maxFileSize = 10*1024*1024,
00027 unsigned int maxBackupIndex = 1,
00028 bool append = true,
00029 mode_t mode = 00644);
00030
00031 virtual void setMaxBackupIndex(unsigned int maxBackups);
00032 virtual unsigned int getMaxBackupIndex() const;
00033 virtual void setMaximumFileSize(size_t maxFileSize);
00034 virtual size_t getMaxFileSize() const;
00035
00036 virtual void rollOver();
00037
00038 protected:
00039 virtual void _append(const LoggingEvent& event);
00040
00041 unsigned int _maxBackupIndex;
00042 size_t _maxFileSize;
00043 };
00044 }
00045
00046 #endif // _LOG4CPP_ROLLINGFILEAPPENDER_HH
log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Aug 14 2016 03:18:26