
17 Mar
2010
17 Mar
'10
8:31 p.m.
On 03/17/2010 11:04 PM, vicente.botet wrote:
maybe
#if defined (LOG_NTRACE) #define LOG_TRACE(logger, stream) if (true); else logger #else #define LOG_TRACE(logger, stream) BOOST_LOG_SEV(logger, trace)<< stream; #endif
I would like all the BOOST_LOG logger macros works this way.
That still leaves the streaming statements compiled. Although they will likely be optimized away, this doesn't eliminate the compilation cost and does not guarantee that no other traces of logging are left (such as string constants or functions).