libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qi::log

logging facilities (with rt support)
See qi::log Developer Guide for a global overview of the logging system.
More...

logging facilities (with rt support)
See qi::log Developer Guide for a global overview of the logging system.

How to use log:

#include <cstdlib> //for atexit
#include <qi/log.hpp>
void main() {
// first init the log system
// c syntax
qiLogInfo("foo.bar", "%s kick %s" , "foo", "bar");
qiLogInfo("foo.bar", "%s punch %s", "bar", "foo");
qiLogWarning("pif.paf", "pif kiss paf %d time", 42);
// c++ syntax
qiLogInfo("tic.tac") << "tic, " << "tac " << 42 << " times";
qiLogVerbose("foo.bar") << "bar punch " << "foo";
}
Warning
You should call qi::log::init at the start of your program and register a handler when the program exit to destroy the logger.