Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2001-11-26 23:39:07


Jesse Jones wrote:

>>Ok, I don't understand then what you mean by "take optional
>>arguments...to modify the formatting." What formatting are you
>>modifying?
>
> It's the ToStr methods:
> LOG(NULL, "pi = ", ToStr(pi, 3));
>
> would print pi to 3 decimal places.

I see. Thanks for clarifying.

>>I always thought it would be nice for my users to scream at me
>>and then tell me where the problem is. :) A unique ID for each
>>(static) message would be almost as good.
>
> It's useful with asserts, but I can't think of anyplace where I've
> used logging where it would be helpful.

Well, I'd think we'd want some sort of panic/assert message support,
and if we have that, why not include a line-number option for
all logging? Maybe it's not always needed, but are there serious
downsides to including it? Yes, the preprocessor, but is there
anything _else_? :)

> I've gotten up to eight or nine arguments so ten is probably a bit
> too small. OTOH if someone is using LOG with too many arguments they
> could just call LOG more than once...

True. The "flow" of the function call seems kinda weird to me,
but that's probably because I'm used to iostreams.

>>> interested in. This isn't as in your face as a menu, but I think
>>> misspelled categories would still be found fairly quickly.
>>>
>>You're probably right, but I'm a fail-fast kinda guy. :)
>
> Me too, but there are nice advantages to using strings and the
> failure consequences are pretty mild.

I'll give you that. :)

                       -Dave

-- 
"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

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