From: Hoeffner, Detlef (Detlef.Hoeffner_at_[hidden])
Date: 2002-04-10 03:45:48
A logging library is definitely something that is missing in boost.
Having partially implemented and heavily used such a library in a
productive multithreaded C++-server application I will list some
requirements our implementation (which is running under Windows and Solaris)
fulfilled and which I believe a standard logging library should fulfill.
1) std::ostream interface for writing messages
2) Support for several categories which can be enabled or disabled through
3) Configurable output targets for each category
4) Configurable general format and standard elements of the output per
(and target), e.g.
5) Small runtime overhead if looging for a category is disabled during
6) No runtime overhead if logging for a category is not required for a
if looging for category trace is not required in a release build
7) The logging system shall be usable in the startup phase (before main is
as well as in the shutdown phase (after main).
8) The logging library shall be usable in a multithreaded application and
output for "one" whole message.
9) Depending on in which method or function (alternatively in which file)
the logging is done,
output might be enabled or disabled through configuration.
Providing a complete general logging library is difficult because some
might only be provided in a platform dependent manner. In particular this is
true for nice
features like retrieving the qualified name of the calling method. In my
feature is very helpful and a general logging library should provide support
on platforms where this can be supported even if it can't be provided on all
Otherwise users might decide not to use the library in favor of another
supports this feature.
Dipl. Wirtsch.-Ing. Detlef Höffner
c/o Commerzbank AG
Tel. +49 (0) 69 136 26845
Tel. +49 (0) 177 3958509
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk