class for (error) messages.
More...
#include <errMsgQueue.h>
|
| message (level aLogLevel, const location &aLocation, const std::string &aObject, const std::string &aAction, const std::string &aMessage) |
|
class for (error) messages.
Instances should be created via the errMsg::emit() function only.
Definition at line 63 of file errMsgQueue.h.
◆ message()
errMsg::message::message |
( |
level |
aLogLevel, |
|
|
const location & |
aLocation, |
|
|
const std::string & |
aObject, |
|
|
const std::string & |
aAction, |
|
|
const std::string & |
aMessage |
|
) |
| |
|
inlineprivate |
◆ ~message()
errMsg::message::~message |
( |
| ) |
|
|
inline |
◆ generateMsg()
static void errMsg::message::generateMsg |
( |
level |
aLogLevel, |
|
|
const location & |
aLocation, |
|
|
const std::string & |
aObject, |
|
|
const std::string & |
aAction, |
|
|
const std::string & |
aMessage |
|
) |
| |
|
inlinestatic |
◆ getAction()
const std::string& errMsg::message::getAction |
( |
| ) |
const |
|
inline |
◆ getLoc()
const location& errMsg::message::getLoc |
( |
| ) |
const |
|
inline |
◆ getLogLevel()
◆ getMessage()
const std::string& errMsg::message::getMessage |
( |
| ) |
const |
|
inline |
◆ getObject()
const std::string& errMsg::message::getObject |
( |
| ) |
const |
|
inline |
◆ getQueue()
◆ getThreadId()
std::thread::id errMsg::message::getThreadId |
( |
| ) |
const |
|
inline |
◆ getTimeStamp()
std::chrono::system_clock::time_point errMsg::message::getTimeStamp |
( |
| ) |
const |
|
inline |
◆ printMsgs()
static void errMsg::message::printMsgs |
( |
| ) |
|
|
inlinestatic |
simple printer function for messages, can be used as a std::thread
Definition at line 95 of file errMsgQueue.h.
97 std::cerr <<
msg->loc.getFile() <<
":" <<
msg->loc.getLine() <<
": in " <<
msg->loc.getFunc() <<
": " <<
msg->object <<
" " <<
msg->action <<
" " <<
msg->msg <<
"\n";
References getQueue(), and msg.
Referenced by main().
◆ action
std::string errMsg::message::action |
|
private |
◆ loc
◆ logLevel
level errMsg::message::logLevel |
|
private |
◆ msg
std::string errMsg::message::msg |
|
private |
◆ object
std::string errMsg::message::object |
|
private |
◆ threadId
std::thread::id errMsg::message::threadId |
|
private |
◆ timeStamp
std::chrono::system_clock::time_point errMsg::message::timeStamp |
|
private |
The documentation for this class was generated from the following file: