Boost logo

Boost :

From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-04-07 12:46:16


Hello Gareth,

Monday, April 2, 2007, 7:37:54 AM, you wrote:

> Hi,

> I've finished a conversion of my library (boostification) and
> placed it in the Vault under the file name boost-logger-lpp.zip

> I have spent some time reading through the old posts as directed and
> found much interesting insights there. LogPlusPlus (my logger) is
> largely complete and so has not been designed or implemented based on any of
> this discussion, however I do feel it might hit some nails on the head
> although in its current state it also misses others.

> http://www.boost-consulting.com/vault/index.php?action=downloadfile&filename=boost-logger-lpp.zip&directory=&

> In the src directory there is a file called 'test.cpp' that works as a
> tutorial
> and a demo program rolled into one.

> I have been planning to revise the back-end of the implementation for some
> time and to that end would be grateful for any comments on how to implement
> things differently.

I took a look at the docs and the implementation.

The implementation is text stream oriented, it does not provide
attribute support except the severity level, that is implemented as a
mask of named streams inside the logger. But the log message text is
still formatted regardless of wether it will be actually logged.

As for loggers, they are not default-constructible, which gave me a
bad surprise. It appears like I would have to get and setup a logger
in each function separately, even if these functions are members of a
single class. I may have missed something here.

Each logger may output to one or several streams but it is not clear
wether I can decide which log record goes to which stream. I got the
impression that the record is simply output into each stream the
logger has, which means I would have to create as many loggers as many
independently configurable sinks I need. This flaw is partially solved
with the ability to connect loggers to each other (as they essentially
are streams) but this makes such initialization too complex.

There are other features not present in the implementation, such as
wide characters support, scope logging and mature filtering.

The lib looks quite simple and useful for relatively small solutions
but still lacks extensibility to be suitable for industrial usage.
I don't agree with some design approaches, but the ability to build
logging hierarchies looks nice. Such feature may be useful to control
several sinks in a common manner, though, IMO, it is not the most
wanted thing.

-- 
Best regards,
 Andrey                            mailto:andysem_at_[hidden]

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