From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH 0/6 v2] logging refactoring Date: Tue, 15 Dec 2009 17:57:58 -0500 Message-ID: <4B281476.7090408@garzik.org> References: <1260317516-30991-1-git-send-email-cmccabe@alumni.cmu.edu> <436f52800912132323paf46ea2j6392ce81e13a7981@mail.gmail.com> <4B26A1C0.2080401@garzik.org> <436f52800912141818s1dea5f9bg2d156597210c7bb8@mail.gmail.com> <20091215111904.05b1b260@redhat.com> <4B280FDA.9010705@garzik.org> <20091215154733.39cfb54f@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ir2atWxsnUGxHattMUcYg9FJZ1TZQt6g7Np7j5nma5Y=; b=GskV6pGANxZLupQgZBHztMBu9nKJH10Mb5nUJ/pfHkiF7gEvixB5k6AJ84rdQYWPPr r1yMBqyi9Y4CaFWehBIzaWN6Pg2BItKwCVjLJhTwegZMStBNhiw24LIug1s5R3BwYwZt tLgWw+15/etfX+j9MCKcEFqEROrC2W3az0DaM= In-Reply-To: <20091215154733.39cfb54f@redhat.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: Colin McCabe , Project Hail List On 12/15/2009 05:47 PM, Pete Zaitcev wrote: > On Tue, 15 Dec 2009 17:38:18 -0500 > Jeff Garzik wrote: > >>> 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. >> >> It would be nice to disconnect from syslog, yes. But the 'warning' log >> level has value. > > Can you offer any guidelines that are easy to follow and enforce? > I am often confused and select the level randomly. The only rule > I follow is: if and only if it's under if (debugging), then LOG_DEBUG. > Otherwise... hmm... Sure, man 3 syslog :) Err - error message, that will probably kill the server. Warn - warning message - bad, but not fatal to the server info - information message, like startup messages debug - debugging messages, of interest mainly to programmers Jeff