logging/debugging

Mark Atwood fallenpegasus at gmail.com
Fri May 19 18:53:26 UTC 2017


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 <devel at ntpsec.org>
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 at ntpsec.org
> http://lists.ntpsec.org/mailman/listinfo/devel
>
-- 

Mark Atwood
http://about.me/markatwood
+1-206-604-2198 SMS & Signal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170519/2e8df4e5/attachment.html>


More information about the devel mailing list