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"
12 
13 namespace log4cpp {
14 
15  AppenderSkeleton::AppenderSkeleton(const std::string& name) :
16  Appender(name),
17  _threshold(Priority::NOTSET),
18  _filter(NULL) {
19  }
20 
22  if (_filter)
23  delete _filter;
24  }
25 
27  return true;
28  }
29 
31  if ((Priority::NOTSET == _threshold) || (event.priority <= _threshold)) {
32  if (!_filter || (_filter->decide(event) != Filter::DENY)) {
33  _append(event);
34  }
35  }
36  }
37 
39  _threshold = priority;
40  }
41 
43  return _threshold;
44  }
45 
47  if (_filter != filter) {
48  if (_filter)
49  delete _filter;
50 
51  _filter = filter;
52  }
53  }
54 
56  return _filter;
57  }
58 
59 }
60 
virtual Decision decide(const LoggingEvent &event)
Definition: Filter.cpp:50
virtual void _append(const LoggingEvent &event)=0
virtual void setFilter(Filter *filter)
AppenderSkeleton(const std::string &name)
virtual void doAppend(const LoggingEvent &event)
virtual Filter * getFilter()
Priority::Value priority
Definition: LoggingEvent.hh:67
virtual Priority::Value getThreshold()
virtual void setThreshold(Priority::Value priority)


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:14:17