MRPT
2.0.4
|
Struct responsible of holding information relevant to the message (in std::string form) issued by the user.
Upon TMsg initialization, instance fetches the name of the caller COutputLogger, as well as the VerbosityLevel and the mrpt::Clock::time_point of the message provided. The format of the message when this is printed / or written to an external file complies is given below:
Definition at line 268 of file system/COutputLogger.h.
Public Member Functions | |
TMsg (const mrpt::system::VerbosityLevel level, std::string_view msg, const COutputLogger &logger) | |
Class constructor that passes a message in std::string form as well as a reference to the COutputLogger that provided the current message. More... | |
~TMsg () | |
Default Destructor. More... | |
std::string | getAsString () const |
Return a string representation of the underlying message. More... | |
void | getAsString (std::string *contents) const |
Fill the string with the contents of the underlying message in string representation. More... | |
void | writeToStream (std::ostream &out) const |
Write the message contents to the specified stream. More... | |
void | dumpToConsole () const |
Dump the message contents to the standard output. More... | |
Public Attributes | |
mrpt::Clock::time_point | timestamp |
Timestamp of the message. More... | |
VerbosityLevel | level |
Verbosity level of the message. More... | |
std::string | name |
Name of the COutputLogger instance that called registered the message. More... | |
std::string | body |
Actual content of the message. More... | |
COutputLogger::TMsg::TMsg | ( | const mrpt::system::VerbosityLevel | level, |
std::string_view | msg, | ||
const COutputLogger & | logger | ||
) |
Class constructor that passes a message in std::string form as well as a reference to the COutputLogger that provided the current message.
Definition at line 222 of file COutputLogger.cpp.
|
default |
Default Destructor.
void COutputLogger::TMsg::dumpToConsole | ( | ) | const |
Dump the message contents to the standard output.
Definition at line 256 of file COutputLogger.cpp.
References mrpt::system::CONCOL_NORMAL, mrpt::system::COutputLogger::logging_levels_to_colors(), mrpt::system::LVL_ERROR, and mrpt::system::setConsoleColor().
Referenced by mrpt::system::COutputLogger::logStr().
std::string COutputLogger::TMsg::getAsString | ( | ) | const |
Return a string representation of the underlying message.
Definition at line 234 of file COutputLogger.cpp.
References mrpt::system::COutputLogger::logging_levels_to_names(), out, and mrpt::system::timeLocalToString().
Referenced by mrpt::system::COutputLogger::getLoggerLastMsg().
void COutputLogger::TMsg::getAsString | ( | std::string * | contents | ) | const |
Fill the string with the contents of the underlying message in string representation.
Definition at line 244 of file COutputLogger.cpp.
void COutputLogger::TMsg::writeToStream | ( | std::ostream & | out | ) | const |
Write the message contents to the specified stream.
Definition at line 248 of file COutputLogger.cpp.
References out.
std::string mrpt::system::COutputLogger::TMsg::body |
Actual content of the message.
Definition at line 302 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::logStr().
VerbosityLevel mrpt::system::COutputLogger::TMsg::level |
Verbosity level of the message.
Definition at line 299 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::logStr().
std::string mrpt::system::COutputLogger::TMsg::name |
Name of the COutputLogger instance that called registered the message.
Definition at line 300 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::logStr().
mrpt::Clock::time_point mrpt::system::COutputLogger::TMsg::timestamp |
Timestamp of the message.
Definition at line 298 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::logStr().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |