|
Boost : |
Subject: Re: [boost] [log] Boost.Log Formal Review
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-03-17 16:31:35
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).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk