Boost logo

Boost :

From: Trey Jackson (trey.jackson_at_[hidden])
Date: 2005-05-19 13:49:49


Darn - forgot reply responds to boost. So, I apologize for the stupid
spam.

The scenario we use is something akin to the following (using macros):

    LOG(int level, string tag) << "whatever";

The logging (as a whole) can be enabled/disabled. When enabled,
portions (according to the 'tag') as well as the level, can be
selectively enabled.

Levels and tags are automatically inserted into the stream (for
post-filtering if desired).

We generally have different logs/streams for different types of
logging: errors, warnings, developer messages, determinism checks:

   ERROR_LOG(...) << ...;
   WARNING_LOG(...) << ...;
   etc.

Which of course can be tied (at runtime) to the same stream or
different streams.

There's always the push for "speed", so a compile-time disabling
(akin to NDEBUG for asserts) of certain streams is required.

Note: we're not using boost logging, just because we've already got
something that works.

TJ

-- 
Trey Jackson
trey.jackson_at_[hidden]
"Never eat more than you can lift."
-- Miss Piggy, a Jim Henson puppet

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