Boost logo

Boost :

Subject: Re: [boost] [log] Boost.Log formal review
From: barend (barend_at_[hidden])
Date: 2010-03-14 18:16:51


Hi Andrey,

If you're speaking of libraries in the broader meaning than Boost, then

I see no problem in using Boost.Log in them. In fact, I think Boost.Log

is suited quite well for this scenario. That actually is also true for

the compiled libraries in Boost.

Sure, for non-Boost libraries I don't see problems and Boost.Log will be
useful.

As for header-only libraries, I think, the most reasonable solution

would be to provide a configuration option for these libraries, so that

the user is able to decide, whether he wants logging or not. After all,

if the user already employs Boost.Log in his application, there's no

downside if headers of Boost libraries also use Boost.Log to provide

more information. If the user strives for header-onlyness, he would be

able to remove references to Boost.Log.

This sounds as a reasonable 'solution' indeed. Logging in libraries is in
many situations done for the library writer, just as a debugging utility.
It's probably always optional then. The cases where it's broader than
debugging, it should also be optional and I hope library writers (especially
the ones Boost.Geometry depends on) will do that. So I state 'solution'
because there is nothing to 'force' a library writer. However, most
header-only library writers will probably not convert their library to
non-header-only, only for logging.

I've seen that you also refer to the possibility to make Boost.Log header
only in your TODO list.

Thanks, Barend


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