I am using log4cxx for logging in C++ projects. Currently, my log calls look like
LOG4CXX_INFO(log4cxx::Logger::getRootLogger(), "parsed " << lc << " lines");
This is still too verbose and hard to remember. Ideally, a logging statement would look similar to
log.debug("parsed %d lines", lc)
a) What can I do to get more concise logging statements?
b) Is it possible to use a printf
-like syntax?