From: Andreas Wachowski (andreas.wachowski_at_[hidden])
Date: 2005-08-02 13:45:26


John Torjo wrote:
> Hi all,
>
> Just updated the Logging library. Find it here:
> http://torjo.com/code/logging.zip
> Also, I've updated the docs. Feedback is welcome.
>
>
> Highlights:
[snip]
> **** Multiple levels.
> You can specify levels, very much like log4j.
>
> To assign a level to a message, use BOOST_LOGL, like this:
> BOOST_LOGL(app,dbg) << "some debug message";
> BOOST_LOGL(app,err) << "some error";
> BOOST_LOGL(gui,warn) << "some GUIsh warning";
>
> Note the BOOST_LOG still works:
> BOOST_LOG(app) << "some message";
> // equivalent to:
> // BOOST_LOGL(app,default_) << "some message"
>

Hello John, Hi all,

This is very good news indeed! In fact, I had integrated the Boost
logging last Tuesday in our app, currently employing a workaround for
levels (just writing levels as subcategories in brackets, like so:
"category.subcategory.[level]"). I am eager to try out the new version.

Having just looked at the doc and a little bit at the source code, I
couldn't find a way to append (or prepend) the level to the log message.
In this regard, one might also want to associate identifying strings
with a level (analogous to how this can be done with BOOST_DEFINE_LOG).

Having said that, I have to admit that I have just started using the
library, and just looked a few minutes at the new version, so there
might be solutions to this I haven't thought of. Feedback is very much
appreciated.

Overall, the handling of levels seems intuitive and easy to use.

Many thanks,
Andreas