log4cpp
1.1.6
Toggle main menu visibility
Loading...
Searching...
No Matches
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
25
class
LOG4CPP_EXPORT
DailyRollingFileAppender
:
public
FileAppender
{
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
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition
Export.hh:26
FileAppender.hh
Portability.hh
log4cpp::DailyRollingFileAppender::maxDaysToKeepDefault
static unsigned int maxDaysToKeepDefault
Definition
DailyRollingFileAppender.hh:36
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:42
log4cpp::DailyRollingFileAppender::rollOver
virtual void rollOver()
Definition
DailyRollingFileAppender.cpp:72
log4cpp::DailyRollingFileAppender::_logsTime
struct tm _logsTime
last log's file creation time (or last modification if appender just created)
Definition
DailyRollingFileAppender.hh:45
log4cpp::DailyRollingFileAppender::_append
virtual void _append(const LoggingEvent &event)
Log in Appender specific way.
Definition
DailyRollingFileAppender.cpp:150
log4cpp::DailyRollingFileAppender::_maxDaysToKeep
unsigned int _maxDaysToKeep
Definition
DailyRollingFileAppender.hh:41
log4cpp::DailyRollingFileAppender::getMaxDaysToKeep
virtual unsigned int getMaxDaysToKeep() const
Definition
DailyRollingFileAppender.cpp:68
log4cpp::DailyRollingFileAppender::setMaxDaysToKeep
virtual void setMaxDaysToKeep(unsigned int maxDaysToKeep)
Definition
DailyRollingFileAppender.cpp:64
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