log4cpp  1.1.6
DailyRollingFileAppender.hh
Go to the documentation of this file.
1 /*
2  * DailyRollingFileAppender.hh
3  *
4  * Copyright 2015, Alexander Perepelkin. All rights reserved.
5  *
6  * See the COPYING file for the terms of usage and distribution.
7  */
8 
9 #ifndef _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH
10 #define _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH
11 
12 #include <ctime>
13 #include <log4cpp/FileAppender.hh>
14 #include <log4cpp/Portability.hh>
15 #include <stdarg.h>
16 #include <string>
17 
18 namespace log4cpp {
19 
26  public:
27  DailyRollingFileAppender(const std::string& name, const std::string& fileName,
28  unsigned int maxDaysToKeep = maxDaysToKeepDefault, bool append = true,
29  mode_t mode = 00644);
30 
31  virtual void setMaxDaysToKeep(unsigned int maxDaysToKeep);
32  virtual unsigned int getMaxDaysToKeep() const;
33 
34  virtual void rollOver();
35 
36  static unsigned int maxDaysToKeepDefault;
37 
38  protected:
39  virtual void _append(const LoggingEvent& event);
40 
41  unsigned int _maxDaysToKeep;
45  struct tm _logsTime;
46  };
47 } // namespace log4cpp
48 
49 #endif // _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH
DailyRollingFileAppender is a FileAppender that rolls over the logfile once the next day starts...
Definition: DailyRollingFileAppender.hh:25
unsigned int _maxDaysToKeep
Definition: DailyRollingFileAppender.hh:41
Definition: FileAppender.hh:20
#define LOG4CPP_EXPORT
Definition: Export.hh:26
The top level namespace for all &#39;Log for C++&#39; types and classes.
Definition: AbortAppender.hh:16
static unsigned int maxDaysToKeepDefault
Definition: DailyRollingFileAppender.hh:36
The internal representation of logging events.
Definition: LoggingEvent.hh:32