cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] logsys in fenced
Date: Wed, 25 Jun 2008 10:55:58 -0500	[thread overview]
Message-ID: <20080625155558.GB18958@redhat.com> (raw)
In-Reply-To: <48625C06.4040905@redhat.com>

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).



  reply	other threads:[~2008-06-25 15:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25  4:25 [Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.05-9-g95a5c6b fabbione
2008-06-25 14:43 ` [Cluster-devel] logsys in fenced David Teigland
2008-06-25 14:53   ` Christine Caulfield
2008-06-25 15:55     ` David Teigland [this message]
2008-06-25 16:12   ` Steven Dake
2008-06-25 16:19   ` Fabio M. Di Nitto
2008-06-25 16:50     ` David Teigland
2008-06-25 17:04       ` Fabio M. Di Nitto
2008-06-25 17:30         ` David Teigland
  -- strict thread matches above, loose matches on Subject: below --
2008-06-25 21:21 David Teigland
2008-06-26  3:48 ` Fabio M. Di Nitto
2008-06-26 14:05   ` David Teigland
2008-06-27  3:45     ` Fabio M. Di Nitto
2008-06-27 15:12       ` Fabio M. Di Nitto
2008-06-26 21:43 ` David Teigland
2008-06-27 15:06   ` David Teigland
2008-06-27 15:16     ` Fabio M. Di Nitto
2008-06-28  3:27     ` Joel Becker
2008-06-28  3:50       ` Steven Dake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080625155558.GB18958@redhat.com \
    --to=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).