Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
log4cpp
DailyRollingFileAppender.hh
Go to the documentation of this file.
1
/*
2
* DailyRollingFileAppender.hh
3
*
4
* See the COPYING file for the terms of usage and distribution.
5
*/
6
7
#ifndef _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH
8
#define _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH
9
10
#include <
log4cpp/Portability.hh
>
11
#include <
log4cpp/FileAppender.hh
>
12
#include <string>
13
#include <stdarg.h>
14
15
namespace
log4cpp
{
16
22
class
LOG4CPP_EXPORT
DailyRollingFileAppender
:
public
FileAppender
{
23
public
:
24
DailyRollingFileAppender
(
const
std::string& name,
25
const
std::string& fileName,
26
unsigned
int
maxDaysToKeep = maxDaysToKeepDefault,
27
bool
append =
true
,
28
mode_t
mode = 00644);
29
30
virtual
void
setMaxDaysToKeep(
unsigned
int
maxDaysToKeep);
31
virtual
unsigned
int
getMaxDaysToKeep()
const
;
32
33
virtual
void
rollOver();
34
35
static
unsigned
int
maxDaysToKeepDefault
;
36
protected
:
37
virtual
void
_append(
const
LoggingEvent
& event);
38
39
unsigned
int
_maxDaysToKeep
;
40
// last log's file creation time (or last modification if appender just created)
41
struct
tm _logsTime;
42
};
43
}
44
45
#endif // _LOG4CPP_DAILYROLLINGFILEAPPENDER_HH
log4cpp::DailyRollingFileAppender
Definition:
DailyRollingFileAppender.hh:22
log4cpp::DailyRollingFileAppender::_maxDaysToKeep
unsigned int _maxDaysToKeep
Definition:
DailyRollingFileAppender.hh:39
log4cpp::FileAppender
Definition:
FileAppender.hh:20
Portability.hh
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition:
Export.hh:26
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::DailyRollingFileAppender::maxDaysToKeepDefault
static unsigned int maxDaysToKeepDefault
Definition:
DailyRollingFileAppender.hh:35
log4cpp::LoggingEvent
Definition:
LoggingEvent.hh:32
log4cpp::mode_t
int mode_t
Definition:
config-win32.h:159
FileAppender.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 Jun 23 2019 19:10:00