From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [Patch 3/7] tabled: Reduce verbosity in CLD client Date: Sat, 14 Nov 2009 03:37:50 -0500 Message-ID: <4AFE6C5E.60308@garzik.org> References: <20091113233229.00da056a@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20091113233229.00da056a@redhat.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: Project Hail List 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 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