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?
You can use the Boost.Format library http://www.boost.org/doc/libs/1_52_0/libs/format/doc/format.html
PS. C++11 convenience functions example: