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 
23  close();
24  }
25 
27  // empty
28  }
29 
30  void AbortAppender::_append(const LoggingEvent& event) {
31  std::abort();
32  }
33 
35  return true;
36  }
37 
39  return false;
40  }
41 
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 }
std::auto_ptr< Appender > create_abort_appender(const FactoryParams &params)
virtual void setLayout(Layout *layout)
virtual void _append(const LoggingEvent &event)
required_params_validator required(const char *param, T &value) const
details::parameter_validator get_for(const char *tag) const
AbortAppender(const std::string &name)
virtual bool requiresLayout() const


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