Boost logo

Boost :

From: Daniel Frey (d.frey_at_[hidden])
Date: 2005-05-20 13:51:24

John Torjo wrote:
> Daniel Frey wrote:
>> John Torjo wrote:
>>> I've just updated the Boost Log Library:
>> It's good to see progress on logging and what I've seen so far looks
>> promising. However...
>>> BOOST_LOG(app) << "testing " << i << '-' << j << '-' << k << std::endl;
>>> BOOST_LOG(dbg) << "this is a debug message, i=" << i << std::endl;
>>> BOOST_LOG(info) << "I just wanted to tell you something....";
>> ...while I like the feeling of the stream approach from a user's
>> perspective, there is one (IMHO important) feature that can not be
>> implemented with it: Exception guards.
> When there's a will, there's a way ;)
> You do raise a very valid point -- about exceptions. I will add
> exception guards.

Looking at the latest version (, I neither found them in the
code nor on the ToDo-list. And I can't imagine how you could be able to
add them with the current design, but I might be missing something. Care
to share your ideas how to do it even in case the technique probably
won't make it into your library? I'm just curious to learn a new trick :))

Another point: IIRC, some month ago we talked about the logging library
in an earlier version. I proposed to allow

  if( app ) { ... }

instead of

  if( BOOST_IS_LOG_ENABLED(app) ) { ... }

and you agreed it makes sense. AFAIR it appeared to be very easy, but
the library evolved since then. Is it still possible in the current library?

Regards, Daniel

Boost list run by bdawes at, gregod at, cpdaniel at, john at