Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
AbortAppender.cpp
Go to the documentation of this file.
1
/*
2
* AbortAppender.cpp
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
#include "
PortabilityImpl.hh
"
11
#include <
log4cpp/AbortAppender.hh
>
12
#include <
log4cpp/FactoryParams.hh
>
13
#include <cstdlib>
14
#include <memory>
15
16
namespace
log4cpp
{
17
18
AbortAppender::AbortAppender
(
const
std::string& name) :
19
AppenderSkeleton
(name) {
20
}
21
22
AbortAppender::~AbortAppender
() {
23
close
();
24
}
25
26
void
AbortAppender::close
() {
27
// empty
28
}
29
30
void
AbortAppender::_append
(
const
LoggingEvent
& event) {
31
std::abort();
32
}
33
34
bool
AbortAppender::reopen
() {
35
return
true
;
36
}
37
38
bool
AbortAppender::requiresLayout
()
const
{
39
return
false
;
40
}
41
42
void
AbortAppender::setLayout
(
Layout
* layout) {
43
return
;
44
}
45
46
std::auto_ptr<Appender>
create_abort_appender
(
const
FactoryParams
& params)
47
{
48
std::string name;
49
params.
get_for
(
"abort appender"
).
required
(
"name"
, name);
50
return
std::auto_ptr<Appender>(
new
AbortAppender
(name));
51
}
52
}
AbortAppender.hh
log4cpp::create_abort_appender
std::auto_ptr< Appender > create_abort_appender(const FactoryParams ¶ms)
Definition:
AbortAppender.cpp:46
FactoryParams.hh
PortabilityImpl.hh
log4cpp::AbortAppender::setLayout
virtual void setLayout(Layout *layout)
Definition:
AbortAppender.cpp:42
log4cpp::AbortAppender::close
virtual void close()
Definition:
AbortAppender.cpp:26
log4cpp::AppenderSkeleton
Definition:
AppenderSkeleton.hh:24
log4cpp::Layout
Definition:
Layout.hh:22
log4cpp::AbortAppender::_append
virtual void _append(const LoggingEvent &event)
Definition:
AbortAppender.cpp:30
log4cpp::details::parameter_validator::required
required_params_validator required(const char *param, T &value) const
Definition:
FactoryParams.hh:134
log4cpp::FactoryParams
Definition:
FactoryParams.hh:61
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::LoggingEvent
Definition:
LoggingEvent.hh:32
log4cpp::AbortAppender::reopen
virtual bool reopen()
Definition:
AbortAppender.cpp:34
log4cpp::FactoryParams::get_for
details::parameter_validator get_for(const char *tag) const
Definition:
FactoryParams.hh:152
log4cpp::AbortAppender::AbortAppender
AbortAppender(const std::string &name)
Definition:
AbortAppender.cpp:18
log4cpp::AbortAppender::~AbortAppender
virtual ~AbortAppender()
Definition:
AbortAppender.cpp:22
log4cpp::AbortAppender::requiresLayout
virtual bool requiresLayout() const
Definition:
AbortAppender.cpp:38
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