
From: John Torjo <john.lists@torjo.com>
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@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;