DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
tmp.hpp
Go to the documentation of this file.
1namespace dunedaq::logging {
3{
4 template<class>
6
7protected:
8public:
9 static const char* get_uid() { return "dunedaq::logging::Logging::InternalMessage"; }
11 Logging::InternalMessage(const ers::Context& context, const std::string& msg);
12 Logging::InternalMessage(const ers::Context& context, const std::string& msg, const std::exception& cause);
13 Logging::InternalMessage(const ers::Context& context, const std::exception& cause);
14 void raise() const { throw Logging::InternalMessage(*this); }
15 const char* get_class_name() const { return get_uid(); }
17};
18}
19namespace dunedaq::logging {
20inline Logging::InternalMessage::Logging::InternalMessage(const ers::Context& context)
21 : ers::Issue(context)
22{
23}
24inline Logging::InternalMessage::Logging::InternalMessage(const ers::Context& context, const std::string& msg)
25 : ers::Issue(context, msg)
26{
27}
28inline Logging::InternalMessage::Logging::InternalMessage(const ers::Context& context,
29 const std::string& msg,
30 const std::exception& cause)
31 : ers::Issue(context, msg, cause)
32{
33}
34inline Logging::InternalMessage::Logging::InternalMessage(const ers::Context& context, const std::exception& cause)
35 : ers::Issue(context, cause)
36{
37}
38}
39namespace {
40ers::IssueRegistrator<dunedaq::logging::Logging::InternalMessage> dunedaq::logging_Logging::InternalMessage_instance;
41}
42static inline TraceStreamer&
44{
45 if (x.do_m) {
46 x.line_ = r.context().line_number();
47 x.msg_append(r.message().c_str());
48 }
49 if (x.do_s) {
50 if (x.lvl_ == TLVL_INFO)
51 ers::info(r);
52 else if (x.lvl_ == TLVL_LOG)
53 ers::log(r);
54 else
55 ers::debug(r, x.lvl_ - TLVL_DEBUG);
56 x.do_s = 0;
57 }
58 return x;
59}
void operator<<(TraceStreamer &x, const ers::Issue &r)
Definition Logger.hxx:128
void raise() const
throws a copy of this issue preserving the real issue type
Definition tmp.hpp:14
static const char * get_uid()
Definition tmp.hpp:9
const char * get_class_name() const
Get key for class (used for serialisation).
Definition tmp.hpp:15
An abstract interface to access an Issue context.
Definition Context.hpp:40
Base class for any user define issue.
Definition Issue.hpp:76
const Context & context() const
Context of the issue.
Definition Issue.hpp:102
const Issue * cause() const
return the cause Issue of this Issue
Definition Issue.hpp:100
CIB Buffer Issue
void info(const Issue &issue)
Definition ers.hpp:121
void log(const Issue &issue)
Definition ers.hpp:131
void debug(const Issue &issue, int level=debug_level())
Definition ers.hpp:91