Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
genicam
library
CPP
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
LOG4CPP_NS_BEGIN
27
class
LOG4CPP_EXPORT
Filter
;
28
33
class
LOG4CPP_EXPORT
Appender
{
34
public
:
35
36
// helps cleaning up
37
friend
class
HierarchyMaintainer
;
38
45
static
Appender
* getAppender(
const
std::string& name);
46
51
static
bool
reopenAll();
52
57
static
void
closeAll();
58
59
protected
:
65
Appender
(
const
std::string& name);
66
67
public
:
71
virtual
~
Appender
();
72
77
virtual
void
doAppend(
const
LoggingEvent
& event) = 0;
78
84
virtual
bool
reopen() = 0;
85
90
virtual
void
close() = 0;
91
97
virtual
bool
requiresLayout()
const
= 0;
98
103
virtual
void
setLayout(
Layout
* layout) = 0;
104
109
inline
const
std::string&
getName
()
const
{
return
_name; };
110
117
virtual
void
setThreshold(
Priority::Value
priority) = 0;
118
123
virtual
Priority::Value
getThreshold() = 0;
124
128
virtual
void
setFilter(
Filter
* filter) = 0;
129
134
virtual
Filter
* getFilter() = 0;
135
136
private
:
137
typedef
std::map<std::string, Appender*>
AppenderMap
;
138
139
static
AppenderMap*
_allAppenders
;
140
static
threading::Mutex
_appenderMapMutex
;
141
142
static
AppenderMap& _getAllAppenders();
143
static
void
_deleteAllAppenders();
144
static
void
_addAppender(
Appender
* appender);
145
static
void
_removeAppender(
Appender
* appender);
146
147
const
std::string
_name
;
148
private
:
149
// suppress assignment operator
150
Appender
&
operator=
(
const
Appender
&);
151
};
152
153
typedef
std::set<Appender *>
AppenderSet
;
154
LOG4CPP_NS_END
155
156
#endif // _LOG4CPP_APPENDER_HH
LOG4CPP_NS_END
#define LOG4CPP_NS_END
Definition:
Portability.hh:50
Appender::_appenderMapMutex
static threading::Mutex _appenderMapMutex
Definition:
Appender.hh:140
LoggingEvent.hh
HierarchyMaintainer
HierarchyMaintainer is an internal log4cpp class.
Definition:
HierarchyMaintainer.hh:27
Layout.hh
GENAPI_NAMESPACE::operator=
virtual void operator=(bool Value)
Set node value.
Definition:
IBoolean.h:64
LoggingEvent
The top level namespace for all 'Log for C++' types and classes.
Definition:
LoggingEvent.hh:32
Filter
Users should extend this class to implement customized logging event filtering.
Definition:
Filter.hh:49
Portability.hh
Appender::AppenderMap
std::map< std::string, Appender * > AppenderMap
Definition:
Appender.hh:137
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition:
Export.hh:21
threading::Mutex
Definition:
PThreads.hh:58
Appender::getName
const std::string & getName() const
Get the name of this appender.
Definition:
Appender.hh:109
Appender::_allAppenders
static AppenderMap * _allAppenders
Definition:
Appender.hh:139
AppenderSet
std::set< Appender * > AppenderSet
Definition:
Appender.hh:153
Threading.hh
Layout
Extend this abstract class to create your own log layout format.
Definition:
Layout.hh:22
Appender::_name
const std::string _name
Definition:
Appender.hh:147
Priority::Value
int Value
The type of Priority Values.
Definition:
Priority.hh:87
Appender
Implement this interface for your own strategies for printing log statements.
Definition:
Appender.hh:33
Priority.hh
LOG4CPP_NS_BEGIN
#define LOG4CPP_NS_BEGIN
Definition:
Portability.hh:49
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:53