log4cpp
1.1.4
Toggle main menu visibility
Loading...
Searching...
No Matches
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_EXPORT
#define LOG4CPP_EXPORT
Definition
Export.hh:26
FileAppender.hh
Portability.hh
log4cpp::DailyRollingFileAppender::maxDaysToKeepDefault
static unsigned int maxDaysToKeepDefault
Definition
DailyRollingFileAppender.hh:35
log4cpp::DailyRollingFileAppender::DailyRollingFileAppender
DailyRollingFileAppender(const std::string &name, const std::string &fileName, unsigned int maxDaysToKeep=maxDaysToKeepDefault, bool append=true, mode_t mode=00644)
Definition
DailyRollingFileAppender.cpp:40
log4cpp::DailyRollingFileAppender::rollOver
virtual void rollOver()
Definition
DailyRollingFileAppender.cpp:73
log4cpp::DailyRollingFileAppender::_logsTime
struct tm _logsTime
Definition
DailyRollingFileAppender.hh:41
log4cpp::DailyRollingFileAppender::_append
virtual void _append(const LoggingEvent &event)
Log in Appender specific way.
Definition
DailyRollingFileAppender.cpp:151
log4cpp::DailyRollingFileAppender::_maxDaysToKeep
unsigned int _maxDaysToKeep
Definition
DailyRollingFileAppender.hh:39
log4cpp::DailyRollingFileAppender::getMaxDaysToKeep
virtual unsigned int getMaxDaysToKeep() const
Definition
DailyRollingFileAppender.cpp:69
log4cpp::DailyRollingFileAppender::setMaxDaysToKeep
virtual void setMaxDaysToKeep(unsigned int maxDaysToKeep)
Definition
DailyRollingFileAppender.cpp:65
log4cpp::FileAppender::FileAppender
FileAppender(const std::string &name, const std::string &fileName, bool append=true, mode_t mode=00644)
Constructs a FileAppender.
Definition
FileAppender.cpp:27
log4cpp
The top level namespace for all 'Log for C++' types and classes.
Definition
AbortAppender.hh:16
log4cpp::LoggingEvent
The internal representation of logging events.
Definition
LoggingEvent.hh:32
include
log4cpp
DailyRollingFileAppender.hh
Generated by
1.17.0