Boost logo

Boost :

Subject: Re: [boost] [log] Boost.Log formal review closing down
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-03-18 15:26:56


On 03/18/2010 09:38 PM, vicente.botet wrote:
>
>>> I doubt the lambda version can be clearer than that and it would certainly lead to more chances to make hard to diagnose syntax mistakes. Concerns from others about reinvention, in this case inventing your own lambda support, means that users cannot apply whatever knowledge they may have with using other lambda libraries to understanding errors in using yours. Vicente's suggested syntax is clear, simple, and permits meaningful, direct compile diagnostics. It is worth serious consideration.
>>
>> I agree that it is very clear, but I fail to see how it can be supported
>> without hardcoding the line_id and severity_level attributes into the
>> record.
>
> I don't see any trouble the predefined attributes to be hard coded in the log record as this can improve the efficiency of the library. Do you see a problem hard coding the attributes defined by the library?

No, I don't think hardcoding is an acceptable solution for a generic
library.

>> I think that something like that could be done, however:
>>
>> strm<< line_id(rec)<< ":<"<< severity_level(rec)
>> << "> "<< rec.message();
>
> But why message will be different from all other attributes?

Because it's not an attribute. But a free function could be provided for
consistency.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk