$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [log] Boost.Log Formal Review
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-03-17 17:37:16
----- Original Message -----
From: "Andrey Semashev" <andrey.semashev_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, March 17, 2010 9:31 PM
Subject: Re: [boost] [log] Boost.Log Formal Review
>
> 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).
I think that we need to solve two issues when log is not needed.
1st : no time at all spent at runtime if log is not needed.
2nd : reduce the compilation time to a minimum log is not needed.
The first is mandatory, the second is nice to have.
Vicente