Boost logo

Boost :

Subject: Re: [boost] [log] Boost.Log formal review
From: Roland Bock (rbock_at_[hidden])
Date: 2010-03-12 07:49:03

Stewart, Robert wrote:
> Roland Bock wrote:
>> If there really is an urge for a library to actively report some
>> information, I'd agree with Rob Stewart: The client could to
>> provide the library with a callback. Although, I'd say that this
>> should be a rather simple callback (e.g. void (const string&))
>> which should not require Boost.Log.
> I don't think that's sufficient. The callback API should provide a means to discover whether logging at a certain severity is enabled, for example, before the message content is formatted. Otherwise, the library will waste time producing a string that won't be used. Furthermore, any other attributes that might be reasonable to characterize the source of the information, the library name perhaps, might be split from the string if the application's logging API allows it.

Hmm. This is getting complex and (from my perspective) a bit
theoretical. Until now, I cannot think of a generic library having the
need to give information at all.

And for specific libraries, e.g. a network monitoring library which
detects unusual activities, I'd say the interface should be discussed
with the developers/users of those specific libraries.

Boost list run by bdawes at, gregod at, cpdaniel at, john at