
1 Mar
2010
1 Mar
'10
4:12 p.m.
Eric J. Holtman wrote:
Roland Bock wrote:
For instance, instead of
BOOST_LOG_SEV(slg, normal) << "A regular message";
I'd like to use something like
slg.log(normal) << "A regular message";
Pretty sure that's done for performance, so that if the thing being logged is a complex expression, but yet could be trivially filtered, it is not evaluated.
Oh, you mean if I use some #define MINIMUM_LOG_LEVEL 3 then some of these lines are not evaluated? If the respective parts were header only, I wonder if the same could not be done without the MACROS (but with compiler optimization). Regards, Roland