 |
Belle II Software
release-05-01-25
|
11 #include <framework/logging/LogMethod.h>
12 #include <framework/logging/LogConfig.h>
13 #include <framework/logging/LogMessage.h>
14 #include <framework/logging/LogSystem.h>
21 LogMethod::LogMethod(
const char* package,
string function,
string file,
unsigned int line): m_package(package),
22 m_function(std::move(function)), m_file(std::move(file)), m_line(line)
26 string messageText =
"--> Entering method '" +
m_function +
"'";
35 if (std::uncaught_exceptions() > 0) uncaughtExc =
"(" + std::to_string(std::uncaught_exceptions()) +
36 " uncaught exceptions pending)";
40 string messageText =
"<-- Leaving method '" +
m_function +
"' " + uncaughtExc;
const char * m_package
The package name where the message was sent from.
~LogMethod()
The LogMethod destructor.
bool sendMessage(LogMessage &&message)
Sends a log message using the log connection object.
@ c_Info
Info: for informational messages, e.g.
std::string m_file
The file name where the message was sent from.
unsigned int m_line
The line number in the source code where the message was sent from.
std::string m_function
The function name where the message was sent from.
Abstract base class for different kinds of events.
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.