Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2004-04-15 14:53:38


From: John Torjo <john.lists_at_[hidden]>
>
> What I want is to create a simple correspondence from a log_id (a level)
> into a log function.
> Having that, you can always say something like:
> LOG(activity) << whatever... << std::endl;
>
> if 'activity' is turned off this nothing gets evaluated (yes, LOG is a
> macro ;))

But each invocation of operator <<() must be evaluated, if only
to learn that the ostream is disabled, right? That could amount
to a lot of overhead or clients would need to write custom
functions that return a string from a set of arguments to reduce
the number of operator <<() invocations.

Otherwise, it sounds useful.

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

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