|
Boost : |
From: Kevin Cousins (Kevin.Cousins_at_[hidden])
Date: 2004-11-09 00:40:58
Markus Schöpflin wrote"
> John Torjo wrote:
>> Finally, have had some time to update the logging lib. Get it from:
>> http://www.torjo.com/ (of course, it comes packed with docs)
>
> Just a quick thought that came to my mind...
>
> Did you consider using the syntax 'BOOST_LOG(dbg, "message" << foobar);'
> instead of 'BOOST_LOG(dbg) << "message" << foobar;'?
>
> While I think the syntax you use looks far nicer, we ususally need the
> ability to be able to compile away the logging calls completely and this
> only can be done with the first form.
...which introduces the potential for a problem with unintended multiple
parameters to the macro function, a la:
#define BOOST_LOG(x,y) ...
BOOST_LOG(dbg, "message" << templated<1,2>::type() << foobar);
// ^BANG!
BOOST_LOG(dbg, "message" << ( templated<1,2>::type() ) << foobar);
--Kevin.
kevin.cousins_at_[hidden]
_____________________________________________________________________
This email is intended only for the use of the individual or entity named above and may contain information that is confidential and/or privileged. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this Email is strictly prohibited. If you have received this Email in error, please notify us immediately by return email or telephone +61 2 9966 1066 and destroy the original message. Thank You
_______________________________________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk