From: Patrick Bennett (patrick.bennett_at_[hidden])
Date: 2004-03-20 00:43:00
Darren Cook wrote:
> Thanks for the reply. I think your solution solves different problems
> (conditional inclusion; not including streamed data as macro parameter).
> Having read other messages in this thread I think I should pass a 2nd
> param to the LOG macro: an identifier that returns the ostream to use.
> But next time I need logging I'll probably try one of the log4J
> projects mentioned.
In our tracing system, we use a sink-based system. Arbitrarily topics
can be associated with one or more sinks. The topic objects define
whether or not they trace. All tracing occurs through a central trace
manager, which then routes the message to all sinks associated with that
sink. Since there's only one 'sink manager', your logging macro really
only needs one main parameter - the topic (relying on a sink manager
singleton). It's proven to be a very flexible and powerful system.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk