DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
logging
include
logging
tmp.hpp
Go to the documentation of this file.
1
namespace
dunedaq::logging
{
2
class
Logging::InternalMessage
:
public
ers::Issue
3
{
4
template
<
class
>
5
friend
class
ers::IssueRegistrator
;
6
7
protected
:
8
public
:
9
static
const
char
*
get_uid
() {
return
"dunedaq::logging::Logging::InternalMessage"
; }
10
Logging::InternalMessage
(
const
ers::Context
&
context
);
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
(); }
16
ers::Issue
*
clone
()
const
{
return
new
dunedaq::logging::Logging::InternalMessage
(*
this
); }
17
};
18
}
19
namespace
dunedaq::logging
{
20
inline
Logging::InternalMessage::Logging::InternalMessage(
const
ers::Context
& context)
21
:
ers
::
Issue
(context)
22
{
23
}
24
inline
Logging::InternalMessage::Logging::InternalMessage(
const
ers::Context
& context,
const
std::string& msg)
25
:
ers
::
Issue
(context, msg)
26
{
27
}
28
inline
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
}
34
inline
Logging::InternalMessage::Logging::InternalMessage(
const
ers::Context& context,
const
std::exception& cause)
35
: ers::
Issue
(context, cause)
36
{
37
}
38
}
39
namespace
{
40
ers::IssueRegistrator<dunedaq::logging::Logging::InternalMessage> dunedaq::logging_Logging::InternalMessage_instance;
41
}
42
static
inline
TraceStreamer&
43
operator<<
(TraceStreamer& x,
const
dunedaq::logging::Logging::InternalMessage
& r)
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
}
operator<<
void operator<<(TraceStreamer &x, const ers::Issue &r)
Definition
Logger.hxx:128
dunedaq::logging::Logging::InternalMessage
Definition
tmp.hpp:3
dunedaq::logging::Logging::InternalMessage::raise
void raise() const
throws a copy of this issue preserving the real issue type
Definition
tmp.hpp:14
dunedaq::logging::Logging::InternalMessage::get_uid
static const char * get_uid()
Definition
tmp.hpp:9
dunedaq::logging::Logging::InternalMessage::clone
ers::Issue * clone() const
Definition
tmp.hpp:16
dunedaq::logging::Logging::InternalMessage::get_class_name
const char * get_class_name() const
Get key for class (used for serialisation).
Definition
tmp.hpp:15
ers::Context
An abstract interface to access an Issue context.
Definition
Context.hpp:40
ers::IssueRegistrator
Definition
Issue.hpp:58
ers::Issue
Base class for any user define issue.
Definition
Issue.hpp:76
ers::Issue::context
const Context & context() const
Context of the issue.
Definition
Issue.hpp:102
ers::Issue::cause
const Issue * cause() const
return the cause Issue of this Issue
Definition
Issue.hpp:100
dunedaq::logging
Definition
Logging.hpp:19
dunedaq::Issue
CIB Buffer Issue
Definition
CIBModuleIssues.hpp:23
ers
Definition
Logger.hxx:231
ers::info
void info(const Issue &issue)
Definition
ers.hpp:121
ers::log
void log(const Issue &issue)
Definition
ers.hpp:131
ers::debug
void debug(const Issue &issue, int level=debug_level())
Definition
ers.hpp:91
Generated on
for DUNE-DAQ by
1.18.0