From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christine Caulfield Date: Wed, 25 Jun 2008 15:53:58 +0100 Subject: [Cluster-devel] logsys in fenced In-Reply-To: <20080625144343.GA18958@redhat.com> References: <20080625042547.24195.qmail@sourceware.org> <20080625144343.GA18958@redhat.com> Message-ID: <48625C06.4040905@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit David Teigland wrote: >> commit 95a5c6b13294742956b13070ebc4f4513278255f >> Author: Fabio M. Di Nitto >> Date: Wed Jun 25 06:24:11 2008 +0200 >> >> [FENCE] fenced: separate concept of fork and debugging >> >> allow fenced to fork when debugging is set from the configuration >> or the system will hang at boot. >> >> Signed-off-by: Fabio M. Di Nitto >> >> commit da704715c606c9c01637ae53d79f8dec6a8b0389 >> Author: Fabio M. Di Nitto >> Date: Wed Jun 25 05:19:35 2008 +0200 >> >> [FENCE] Allow fenced to configure logsys >> >> Signed-off-by: Fabio M. Di Nitto >> >> commit 18e085596bb8844f74689a92662f2e5e9166836b >> Author: Fabio M. Di Nitto >> Date: Wed Jun 25 04:49:41 2008 +0200 >> >> [FENCE] Move logsys configuration calls where they belong >> >> Signed-off-by: Fabio M. Di Nitto >> >> commit c54c56c5a09f98547ceda3bc5fa9afa28b354480 >> Author: Fabio M. Di Nitto >> Date: Wed Jun 25 04:23:20 2008 +0200 >> >> [FENCE] Make fenced ready to load logsys config >> >> Signed-off-by: Fabio M. Di Nitto >> >> commit cf4c7ebac813b0b607acf6cf74bbdddfc8cfb12a >> Author: Fabio M. Di Nitto >> Date: Tue Jun 24 14:34:35 2008 +0200 >> >> [FENCE] Start porting fenced to logsys >> >> Signed-off-by: Fabio M. Di Nitto > > OK, I'm fine with replacing the use of syslog with logsys, but this goes > beyond that. Here are the problems I see: > > > . Leave log_debug() unchanged, and leave the meaning/effect of -D unchanged. > syslog/logsys are about logging to files. The debug "logging" I use is > about logging to either an in-memory buffer or to stderr; syslog/logsys > are not relevant to that. But isn't the point of logsys to centralise all our logging so the user can say whether it goes to stderr, a file or syslog. and that it all uses the same code so it's easy to tell users how to redirect it as they want. Having a few exceptions that always log to stderr is just confusing and defeats the point of having a common system. > > . Change log_error() to use logsys instead of syslog, i.e. don't change > the existing log_error() call sites. > > #define log_error(fmt, args...) \ > do { \ > log_debug(fmt, ##args); \ > - syslog(LOG_ERR, fmt, ##args); \ > + log_printf(LOG_ERR, fmt, ##args); \ > } while (0) So then we have a do {} while macro whose only purpose is to simply change the name of a function call. Now THAT's surely ugly and pointless. -- Chrissie