Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-03-22 01:37:01


Daniel Frey wrote:

> John Torjo wrote:
>
>> Daniel Frey wrote:
>>
>>> John Torjo wrote:
>>>
>>>> if (activity_log()) activity_log() << ...;
>>>
>>>
>>> Hm, too verbose for my taste. With the macro, you get it for free.
>>>
>> True. I can also add a macro, something like:
>>
>> log(activity) << ...;
>
>
> OK, although there is more to keep in mind. In our logging system, we
> also added a try/catch macro around the expression that is to be
> logged. The reason is, that we never want a log-message to abort the
> program. I attached our actual implementation ('attached' to prevent
> reformatting), obviously I can't show the complete system :)

totally understandable. But why the try/catch inside the macros, instead
of inside the ::Base::Log::log function?

Best,
John


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