Boost logo

Boost :

From: Colin Caughie (c.caughie_at_[hidden])
Date: 2008-02-05 12:32:16


Gennadiy Rozental <rogeeff <at> gmail.com> writes:

>
> The formal review of Logging library, proposed by John Torjo, begins today and
> will run till Feb 13:

We've been using the first version of this logging library since before it was
originally submitted for review, and I'm delighted to see that it is being
revisited.

One fairly serious drawback we found with the old version of the library was its
means of supporting Unicode. Basically (unless we missed something) Unicode
support was a build option, so you either built the library with or without
Unicode. Because some of our code uses Unicode and some doesn't, we had to build
two separate versions of the library.

The new version seems to improve things somewhat in that it all seems to be in
the headers, however I still strongly dislike the use of a preprocessor macro to
tell the headers whether or not to use Unicode. There are two problems with this:

1. Every module that uses the library has to remember to define this macro.
(What would actually happen if some modules did and some didn't?)
2. It seems to make it a global setting, so you couldn't have e.g. an
application that uses wide-char logs using a library that uses narrow-char logs.

Not sure how this could be addressed, but it seems that it should be possible
for the application/library to specify the char type in C++ (not preprocessor)
when defining the log, e.g. as a template argument.

The Boost.FileSystem library solved this problem very nicely in 1.34.0.

Regards,
Colin Caughie


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