|
Boost : |
From: Andrey Semashev (andysem_at_[hidden])
Date: 2008-04-10 13:40:55
Christian Holmquist wrote:
> From reading your previous points it seems I'll end up doing that
> myself anyway? Or shouldn't boost log be a full-fledged logging
> library? I'm now confused exactly which problems it should solve.
>
> Log initialization - user responsibility
It depends. The library may provide utilities to ease this or even
reduce to a single function call in some cases. For example, tools for
logging initialization from a settings file can be provided out-of-box.
Yes, your particular needs can deviate significantly from what the
library provides. And strictly speaking, I agree to the opinion that
such tools are out of scope of the logging library. But providing it
would be a good gesture of the library author and can serve as a
starting point for either a specialized project or your particular
initialization code.
> Thread safety - user responsibility
Why? Unless you use the library in a not thread-safe way the library
should work well in multithreading. Moreover, IMO it should be as much
scalable as possible in order not to limit user application scalability.
The library can provide out-of-box various threading-related features,
like asynchronous logging and thread-specific attributes.
> Multi-module issues - user responsbility
Yep, some corner cases just can't be handled in the logging library
itself. At least, I don't see how.
> Log code generation config - user / library author responsibility
You don't want it to configure itself or add logging to your app just by
including a couple of headers, do you? :)
Of course the logging library should provide some reasonable
configuration defaults, but configuring it to fit for your own needs is
yours only task.
As for logging from inside of Boost, as I said, it can be added later. I
for one, have never had such need in my practice, and logging on my
(user application) side was quite sufficient. I'm not saying that it is
not needed, I'm saying it doesn't worth delaying the library release for
a yet another n years.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk