Boost logo

Boost :

Subject: Re: [boost] [log] Boost.Log formal review
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-03-12 08:34:24

Roland Bock wrote:
> 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.

It is theoretical as we don't yet know what any Boost library (or other generic library) might wish to log. Barend raised the issue, presumably because he was interested in logging from his library. I know that we log a good deal from our internal libraries, but they aren't libraries like those in Boost. What would prove unacceptable is for each Boost library wishing to log something to create its own API for doing so, unless the number of such libraries is close to one.

> 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.

Discussing it on this list is discussing it with the developers and many users.

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

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