Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
AppenderSkeleton.cpp
Go to the documentation of this file.
1
/*
2
* AppenderSkeleton.cpp
3
*
4
* Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2001, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#include "
PortabilityImpl.hh
"
11
#include <
log4cpp/AppenderSkeleton.hh
>
12
13
namespace
log4cpp
{
14
15
AppenderSkeleton::AppenderSkeleton
(
const
std::string& name) :
16
Appender
(name),
17
_threshold(
Priority
::NOTSET),
18
_filter(NULL) {
19
}
20
21
AppenderSkeleton::~AppenderSkeleton
() {
22
if
(
_filter
)
23
delete
_filter
;
24
}
25
26
bool
AppenderSkeleton::reopen
() {
27
return
true
;
28
}
29
30
void
AppenderSkeleton::doAppend
(
const
LoggingEvent
& event) {
31
if
((
Priority::NOTSET
==
_threshold
) || (event.
priority
<=
_threshold
)) {
32
if
(!
_filter
|| (
_filter
->
decide
(event) !=
Filter::DENY
)) {
33
_append
(event);
34
}
35
}
36
}
37
38
void
AppenderSkeleton::setThreshold
(
Priority::Value
priority) {
39
_threshold
= priority;
40
}
41
42
Priority::Value
AppenderSkeleton::getThreshold
() {
43
return
_threshold
;
44
}
45
46
void
AppenderSkeleton::setFilter
(
Filter
* filter) {
47
if
(
_filter
!= filter) {
48
if
(
_filter
)
49
delete
_filter
;
50
51
_filter
= filter;
52
}
53
}
54
55
Filter
*
AppenderSkeleton::getFilter
() {
56
return
_filter
;
57
}
58
59
}
60
log4cpp::Filter::decide
virtual Decision decide(const LoggingEvent &event)
Definition:
Filter.cpp:50
log4cpp::AppenderSkeleton::_append
virtual void _append(const LoggingEvent &event)=0
AppenderSkeleton.hh
PortabilityImpl.hh
log4cpp::Filter::DENY
Definition:
Filter.hh:52
log4cpp::AppenderSkeleton::setFilter
virtual void setFilter(Filter *filter)
Definition:
AppenderSkeleton.cpp:46
log4cpp::Filter
Definition:
Filter.hh:49
log4cpp::AppenderSkeleton::AppenderSkeleton
AppenderSkeleton(const std::string &name)
Definition:
AppenderSkeleton.cpp:15
log4cpp::AppenderSkeleton::doAppend
virtual void doAppend(const LoggingEvent &event)
Definition:
AppenderSkeleton.cpp:30
log4cpp::AppenderSkeleton::getFilter
virtual Filter * getFilter()
Definition:
AppenderSkeleton.cpp:55
log4cpp::Priority::NOTSET
Definition:
Priority.hh:79
log4cpp::LoggingEvent::priority
Priority::Value priority
Definition:
LoggingEvent.hh:67
log4cpp::AppenderSkeleton::getThreshold
virtual Priority::Value getThreshold()
Definition:
AppenderSkeleton.cpp:42
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::LoggingEvent
Definition:
LoggingEvent.hh:32
log4cpp::Priority::Value
int Value
Definition:
Priority.hh:85
log4cpp::AppenderSkeleton::~AppenderSkeleton
virtual ~AppenderSkeleton()
Definition:
AppenderSkeleton.cpp:21
log4cpp::AppenderSkeleton::_filter
Filter * _filter
Definition:
AppenderSkeleton.hh:107
log4cpp::AppenderSkeleton::setThreshold
virtual void setThreshold(Priority::Value priority)
Definition:
AppenderSkeleton.cpp:38
log4cpp::Priority
Definition:
Priority.hh:61
log4cpp::Appender
Definition:
Appender.hh:33
log4cpp::AppenderSkeleton::reopen
virtual bool reopen()
Definition:
AppenderSkeleton.cpp:26
log4cpp::AppenderSkeleton::_threshold
Priority::Value _threshold
Definition:
AppenderSkeleton.hh:106
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