From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Wed, 25 Jun 2008 10:55:58 -0500 Subject: [Cluster-devel] logsys in fenced In-Reply-To: <48625C06.4040905@redhat.com> References: <20080625042547.24195.qmail@sourceware.org> <20080625144343.GA18958@redhat.com> <48625C06.4040905@redhat.com> Message-ID: <20080625155558.GB18958@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Jun 25, 2008 at 03:53:58PM +0100, Christine Caulfield wrote: > >. 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. To a file or syslog yes. Re stderr, I don't think you understand how the stderr output is used. When you run "fenced -D", the daemon is run in the foreground and all debug output goes to stderr. foreground and debug-to-stderr always go together, and it's always an inherently manual process, always done explicitly from the command line, always done on the individual programs you want to observe. This is the *manual debugging process* we're talking about here. > >. 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. No, I count four separate things the log_error macro does (including the name change).