From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pete Zaitcev Subject: Re: [PATCH 0/6 v2] logging refactoring Date: Tue, 15 Dec 2009 11:19:04 -0700 Message-ID: <20091215111904.05b1b260@redhat.com> References: <1260317516-30991-1-git-send-email-cmccabe@alumni.cmu.edu> <436f52800912132323paf46ea2j6392ce81e13a7981@mail.gmail.com> <4B26A1C0.2080401@garzik.org> <436f52800912141818s1dea5f9bg2d156597210c7bb8@mail.gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <436f52800912141818s1dea5f9bg2d156597210c7bb8@mail.gmail.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Colin McCabe Cc: Jeff Garzik , Project Hail List , Colin McCabe On Mon, 14 Dec 2009 18:18:47 -0800 Colin McCabe wrote: > Also my new patch creates a hail_log.h. It didn't really seem right to > force everyone who wanted to use HAIL_LOG to include cldc.h. > > I'll convert over the rest of chunkd and tabled to the new macros if > this patch series gets accepted (but not in this patch series!) You know what else would be nice? I find it irritating to include everywhere due to 1:1 mapping of LOG_XXX values. I'm inclined to think that a switch(){} in applog() would be an acceptable price for getting rid of it. In fact, does anyone even understand why we continue to split LOG_WARNING and LOG_ERR? We really have three log levels: - debug - info (which is actually an error) - error (not really all that different from info actually) Might as well create HAIL_DEBUG, HAIL_INFO, and HAIL_ERR (to be used before exit(1), with values of 0,1,2 and remap to syslog values where it goes to syslog. -- Pete