Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
log4cpp
Appender.hh
Go to the documentation of this file.
1
/*
2
* Appender.hh
3
*
4
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2000, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#ifndef _LOG4CPP_APPENDER_HH
11
#define _LOG4CPP_APPENDER_HH
12
13
#include <
log4cpp/Portability.hh
>
14
#include <string>
15
#include <map>
16
#include <set>
17
#include <stdarg.h>
18
#include <sys/types.h>
19
#include <sys/stat.h>
20
#include <fcntl.h>
21
#include <
log4cpp/Priority.hh
>
22
#include <
log4cpp/Layout.hh
>
23
#include <
log4cpp/LoggingEvent.hh
>
24
#include <
log4cpp/threading/Threading.hh
>
25
26
namespace
log4cpp
{
27
class
LOG4CPP_EXPORT
Filter
;
28
33
class
LOG4CPP_EXPORT
Appender
{
34
public
:
35
42
static
Appender
* getAppender(
const
std::string& name);
43
48
static
bool
reopenAll();
49
54
static
void
closeAll();
55
56
protected
:
62
Appender
(
const
std::string& name);
63
64
public
:
68
virtual
~
Appender
();
69
74
virtual
void
doAppend(
const
LoggingEvent
& event) = 0;
75
81
virtual
bool
reopen() = 0;
82
87
virtual
void
close() = 0;
88
94
virtual
bool
requiresLayout()
const
= 0;
95
100
virtual
void
setLayout(
Layout
* layout) = 0;
101
106
inline
const
std::string&
getName
()
const
{
return
_name; };
107
114
virtual
void
setThreshold(
Priority::Value
priority) = 0;
115
120
virtual
Priority::Value
getThreshold() = 0;
121
125
virtual
void
setFilter(
Filter
* filter) = 0;
126
131
virtual
Filter
* getFilter() = 0;
132
133
private
:
134
typedef
std::map<std::string, Appender*>
AppenderMap
;
135
136
static
AppenderMap*
_allAppenders
;
137
static
threading::Mutex
_appenderMapMutex
;
138
139
static
AppenderMap& _getAllAppenders();
140
static
void
_deleteAllAppenders();
141
static
void
_addAppender(
Appender
* appender);
142
static
void
_removeAppender(
Appender
* appender);
143
144
const
std::string
_name
;
145
};
146
147
typedef
std::set<Appender *>
AppenderSet
;
148
}
149
150
#endif // _LOG4CPP_APPENDER_HH
LoggingEvent.hh
Layout.hh
log4cpp::Appender::_appenderMapMutex
static threading::Mutex _appenderMapMutex
Definition:
Appender.hh:137
log4cpp::Filter
Definition:
Filter.hh:49
log4cpp::Layout
Definition:
Layout.hh:22
Portability.hh
log4cpp::Appender::_name
const std::string _name
Definition:
Appender.hh:144
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition:
Export.hh:26
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::LoggingEvent
Definition:
LoggingEvent.hh:32
log4cpp::Priority::Value
int Value
Definition:
Priority.hh:85
log4cpp::AppenderSet
std::set< Appender * > AppenderSet
Definition:
Appender.hh:147
log4cpp::Appender
Definition:
Appender.hh:33
log4cpp::Appender::_allAppenders
static AppenderMap * _allAppenders
Definition:
Appender.hh:136
log4cpp::Appender::AppenderMap
std::map< std::string, Appender * > AppenderMap
Definition:
Appender.hh:134
log4cpp::threading::Mutex
Definition:
PThreads.hh:36
Threading.hh
log4cpp::Appender::getName
const std::string & getName() const
Definition:
Appender.hh:106
Priority.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