Loggers

Initialization of the logger

Header and preprocessor variable

In order to activate the logger you need to add the following lines:

#define ENABLE_RT_LOG

Initialize the output stream

It is possible to set the output stream of the messages inside a file:

of.open("/tmp/dg-LOGS.txt",std::ofstream::out|std::ofstream::app);

Using the rt_logger

// Somewhere in your library
dgRTLOG() << "your message. Prefer to use \n than std::endl."

Here the output file is "/tmp/dg-LOGS.txt".

Specifying the file with FILE and the line inside the file by LINE are necessary for the STREAM messages. Indeed they are indexed using the two values. The default values "" and 0 for the counting are not well understood.

logger.h
dgRTLOG
#define dgRTLOG()
Definition: real-time-logger.h:17
dynamicgraph::RealTimeLogger::destroy
static void destroy()
Definition: src/debug/real-time-logger.cpp:129
real-time-logger.h
dgADD_OSTREAM_TO_RTLOG
#define dgADD_OSTREAM_TO_RTLOG(ostr)
Definition: real-time-logger.h:16
dynamicgraph::RealTimeLogger::instance
static RealTimeLogger & instance()
Definition: src/debug/real-time-logger.cpp:121


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Oct 22 2023 02:27:08