On Mon, 7 Feb 2000 itojun@iijlab.net wrote:
: >Well, if nothing else, it's certainly a misuse of DIAGNOSTIC. DIAGNOSTIC
: >is for "cheap kernel consistency checks", not for "extra verbose logging
: >when broken user programs are run".
: >The sysctl default value should NOT key off DIAGNOSTIC.
:
: I intend to correct several misuse of DIAGNOSTIC (ipprintfs in
: ip_input.c, some of IPv6 DAD and gif code), which one looks most right?
: - use log(LOG_DEBUG), not printf()
This is the programmer's choice.
: - #ifdef DEBUG
Yes, unless you wish to use something like IPDEBUG.
DEBUG is known to introduce extra printf()s, but they should be occasional
or one-time messages. Messages needing repeating output should use a
separate #ifdef name.
--
-- Todd Vierling (tv@pobox.com)