You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Jostein Tveit <jo...@pvv.ntnu.no> on 2006/05/24 13:59:56 UTC
logstream defines
Hello log4cxx project,
Have you ever thought of adding defines like this:
#define LOG4CXX_DEBUG_STREAM(logger, message) { \
if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
log4cxx::logstream ls(logger, log4cxx::Level::DEBUG);\
ls << message << LOG4CXX_ENDMSG; }}
Then it would be very easy to log for example variables:
LOG4CXX_DEBUG_STREAM(main, "Variable i: " << i);
What do you think?
Am I missing something?
Regards,
--
Jostein Tveit <jo...@pvv.ntnu.no>