Boost logo

Boost :

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


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.

I haven't thought through how what I'm describing might be done in an efficient and flexible manner. Maybe I'm really just saying that Boost.Log should provide a really lightweight path to an easily customized adapter that directs the logging output to the application's logging mechanism. What I don't want is for such a path to trigger the creation of threads or otherwise impose on the application much more than just a simple redirection to the application's preferred logging API.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk