Re: Tracing
Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/FdAmericanOption-problem-and-Tracing-tp3483p3492.html
On 01/14/05 03:58:52, Joseph Wang wrote:
>> Finally, I intentionally wrote a generic "tag" variable, as I'm not sure
>> whether a number or a string should be used. Thoughts?
>
> The way that java does it is to use integer constants. This makes it
> easier to compare and for example turn on all debug statements above
> level N or below level M. If you set the integers to be constants, then
> you don't lose anything regarding readability.
Yes, but it implies a total order. For logs it makes sense (error < warning
< info...) but I was wondering whether one would possibly want to enable
tracing from two different parts of the library without the one necessarily
triggering the other as well...
Later,
Luigi