
22 Mar
2004
22 Mar
'04
6:37 a.m.
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