From: Jeff Garzik <jeff@garzik.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: Re: [Patch 3/7] tabled: Reduce verbosity in CLD client
Date: Sat, 14 Nov 2009 03:37:50 -0500 [thread overview]
Message-ID: <4AFE6C5E.60308@garzik.org> (raw)
In-Reply-To: <20091113233229.00da056a@redhat.com>
On 11/14/2009 01:32 AM, Pete Zaitcev wrote:
> I got into habit of watching logs and there was too much useless
> messaging in them. Some messages were stubs and reminders, so I left
> them in the code, but commented out.
>
> Signed-off-by: Pete Zaitcev<zaitcev@redhat.com>
I applied this, just to keep things moving, but would really like to see
one of two things for each commented-out statement:
1) remove it
2) switch to cld's "-D debuglevel" option format, and bury the logging
statements under a debug level that produces a higher verbosity.
cld has three levels:
0, no debug stmts
1, a reasonable amount of debug stmts
2, everything including per-request verbose output
but tabled need not be tied strictly to three debug levels.
One of the minor design goals of each Hail sub-project is to avoid
#ifdefs and commented-out sections, and always compile 100% of the
source code. Commented-out statements just clutter the code, and _very
quickly_ become obsolete because you do not compile them on a regular basis.
If you want to disable something at compile time, use an enum. That
ensures the disabled code branch makes it to the C compiler for full
type checking, even if the optimizer later strips it out.
Otherwise, just use a simple runtime test to enable/disable features (or
simply delete the code).
Jeff
next prev parent reply other threads:[~2009-11-14 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 6:32 [Patch 3/7] tabled: Reduce verbosity in CLD client Pete Zaitcev
2009-11-14 8:37 ` Jeff Garzik [this message]
2009-11-14 21:16 ` Pete Zaitcev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AFE6C5E.60308@garzik.org \
--to=jeff@garzik.org \
--cc=hail-devel@vger.kernel.org \
--cc=zaitcev@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.