From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-04-26 01:12:37
John Torjo wrote:
>> Hi. If I understand right the code, even if log is disabled, I do pay for
>> constructing log messages. Am I right? If so why do you force this?
> No, you donot pay.
> BOOST_LOG(app) << "testing " << i << '-' << j << '-' << k;
> Is the equivalent of:
> if ( is_log_enabled(app) ) app_log() << "testing" << i ...;
And you need to
1. #include <something>
2. Compile the 'if', and the operators<<, and what not.
Consider that I want to add logging to a header-only library, say some BGL.
algorithm I don't want all users of BGL to depend on a logging library.
They just should be able to #define BOOST_GRAPH_SOME_ALGORITH_LOGGING and
get logging for the specified algorithm -- only if needed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk