Re: logging/debugging

2017-05-19 Thread Mark Atwood via devel
I often use DEBUG_MRA_FOO, and then use judgement and taste as to leave it
in or not.

I use "is it worth writing the documentation for it" as part of deciding to
leave it in or not, and also "am I absolutely sure I have characterized and
fixed this bug such that I'm sure it's fixed, and will not recur".

Often, I once I'm done, I will remove the DEBUG_MRA_FOO and replace it with
an assert, again using judgement and taste.

I will leave it to your judgement and taste.

..m

On Fri, May 19, 2017 at 12:21 AM Hal Murray via devel 
wrote:

>
> Have you thought about logging and/or printout for debugging?
>
> We have DEBUG and DPRINTF.  I almost never use them because the signal to
> noise is so low - it prints stuff from all over but I'm only interested in
> one small corner.
>
> I occasionally add various msyslog lines when I'm chasing a bug and throw
> them away after I have found it.
>
> Would it make sense to preserve them with something like an ifdef DEBUG_FOO
> symbol?
>
> Or if (DEBUG_FOO) so it only adds one extra line of source code rather than
> 2?  (no endif)
>
> Or just put a // in the front of the ones you don't want.
>
>
>
> --
> These are my opinions.  I hate spam.
>
>
>
> ___
> devel mailing list
> devel@ntpsec.org
> http://lists.ntpsec.org/mailman/listinfo/devel
>
-- 

Mark Atwood
http://about.me/markatwood
+1-206-604-2198 SMS & Signal
___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel

logging/debugging

2017-05-19 Thread Hal Murray via devel

Have you thought about logging and/or printout for debugging?

We have DEBUG and DPRINTF.  I almost never use them because the signal to 
noise is so low - it prints stuff from all over but I'm only interested in 
one small corner.

I occasionally add various msyslog lines when I'm chasing a bug and throw 
them away after I have found it.

Would it make sense to preserve them with something like an ifdef DEBUG_FOO 
symbol?

Or if (DEBUG_FOO) so it only adds one extra line of source code rather than 
2?  (no endif)

Or just put a // in the front of the ones you don't want.



-- 
These are my opinions.  I hate spam.



___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel