logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Kelley" <josh...@gmail.com>
Subject Use of operator<<
Date Tue, 18 Mar 2008 14:09:38 GMT
I saw that I can use the << operator within the LOG4CXX_DEBUG, etc.
macros; e.g.:

    LOG4CXX_DEBUG(logger, "Read " << path << " and got " << out);

This seems very convenient (and a whole lot more convenient than
formatting strings myself or having to use something like
boost::format for every log statement), but as far as I can tell, it's
undocumented.  Is this use of operator<< officially supported, or is
it an implementation detail that I should not be relying upon?

If it is supported, then can I add a wiki page about it?  If it's not
supported, then is there a recommended way of doing formatted logging?

Thanks.

Josh Kelley

Mime
View raw message