1 #ifndef EUDAQ_INCLUDED_LogMessage
2 #define EUDAQ_INCLUDED_LogMessage
7 #include "eudaq/Serializable.hh"
8 #include "eudaq/Serializer.hh"
9 #include "eudaq/Status.hh"
10 #include "eudaq/Time.hh"
11 #include "eudaq/Platform.hh"
17 LogMessage(
const std::string &msg =
"", Level level = LVL_EXTRA,
18 const Time &t = Time::Current());
21 virtual void Print(std::ostream &)
const;
22 void Write(std::ostream &)
const;
24 LogMessage &SetLocation(
const std::string &file,
unsigned line,
25 const std::string &func =
"");
26 LogMessage &SetSender(
const std::string &name);
27 std::string GetSender()
const {
29 (m_sendername ==
"" ? std::string(
"") :
"." + m_sendername);
31 std::string GetSenderType()
const {
return m_sendertype; }
32 std::string GetSenderName()
const {
return m_sendername; }
35 std::string m_file, m_func, m_sendertype, m_sendername;
37 Time m_time, m_createtime;
40 inline std::ostream &operator<<(std::ostream &os,
const LogMessage &ev) {
46 #endif // EUDAQ_INCLUDED_LogMessage
Definition: Serializer.hh:156
Definition: LogMessage.hh:15
Definition: Serializer.hh:19