Re: [Patch 3/7] tabled: Reduce verbosity in CLD client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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



--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux