From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5995 invoked by alias); 21 Jul 2008 16:09:51 -0000 Received: (qmail 5962 invoked by uid 9453); 21 Jul 2008 16:09:50 -0000 Date: Mon, 21 Jul 2008 16:09:00 -0000 Message-ID: <20080721160950.5945.qmail@sourceware.org> From: teigland@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, master, updated. cluster-2.99.06-36-gde57092 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 13f57ff2d73a9adc1618996c14184559c181974c X-Git-Newrev: de5709272c1393b55d1a01468978e393437c3f9f Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00107.txt.bz2 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=de5709272c1393b55d1a01468978e393437c3f9f The branch, master has been updated via de5709272c1393b55d1a01468978e393437c3f9f (commit) from 13f57ff2d73a9adc1618996c14184559c181974c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit de5709272c1393b55d1a01468978e393437c3f9f Author: David Teigland Date: Mon Jul 21 11:02:35 2008 -0500 fenced: munge logging to prepare for copying it to the other daemons. Signed-off-by: David Teigland ----------------------------------------------------------------------- Summary of changes: fence/fenced/logging.c | 25 +++++++++++++------------ fence/fenced/main.c | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/fence/fenced/logging.c b/fence/fenced/logging.c index 51f43be..fc5f11c 100644 --- a/fence/fenced/logging.c +++ b/fence/fenced/logging.c @@ -1,9 +1,11 @@ #include "fd.h" #include "config.h" -/* default: errors go to syslog (/var/log/messages) and fenced.log +#define DAEMON_NAME "fenced" + +/* default: errors go to syslog (/var/log/messages) and .log logging/debug=on: errors continue going to syslog (/var/log/messages) - and fenced.log, debug messages are added to fenced.log. */ + and .log, debug messages are added to .log. */ #define DEFAULT_MODE LOG_MODE_OUTPUT_SYSLOG_THREADED | \ LOG_MODE_OUTPUT_FILE | \ @@ -11,10 +13,10 @@ LOG_MODE_FILTER_DEBUG_FROM_SYSLOG #define DEFAULT_FACILITY SYSLOGFACILITY /* cluster config setting */ #define DEFAULT_PRIORITY SYSLOGLEVEL /* cluster config setting */ -#define DEFAULT_FILE LOGDIR "/fenced.log" +#define DEFAULT_FILE LOGDIR "/" DAEMON_NAME ".log" -#define LEVEL_PATH "/cluster/logging/logger_subsys[@subsys=\"FENCED\"]/@syslog_level" -#define DEBUG_PATH "/cluster/logging/logger_subsys[@subsys=\"FENCED\"]/@debug" +#define DAEMON_LEVEL_PATH "/cluster/logging/logger_subsys[@subsys=\"FENCED\"]/@syslog_level" +#define DAEMON_DEBUG_PATH "/cluster/logging/logger_subsys[@subsys=\"FENCED\"]/@debug" /* Read cluster.conf settings and convert them into logsys values. If no cluster.conf setting exists, the default that was used in @@ -95,7 +97,7 @@ static int read_ccs_logging(int *mode, int *facility, int *priority, char *file) p = DEFAULT_PRIORITY; memset(name, 0, sizeof(name)); - read_ccs_name(LEVEL_PATH, name); + read_ccs_name(DAEMON_LEVEL_PATH, name); if (name[0]) { val = logsys_priority_id_get(name); @@ -131,7 +133,7 @@ static int read_ccs_logging(int *mode, int *facility, int *priority, char *file) cfgd_debug_logsys = 1; memset(name, 0, sizeof(name)); - read_ccs_name(DEBUG_PATH, name); + read_ccs_name(DAEMON_DEBUG_PATH, name); if (!strcmp(name, "on")) cfgd_debug_logsys = 1; @@ -145,8 +147,8 @@ static int read_ccs_logging(int *mode, int *facility, int *priority, char *file) void init_logging(void) { - logsys_init("fenced", DEFAULT_MODE, DEFAULT_FACILITY, DEFAULT_PRIORITY, - DEFAULT_FILE); + logsys_init(DAEMON_NAME, DEFAULT_MODE, DEFAULT_FACILITY, + DEFAULT_PRIORITY, DEFAULT_FILE); } /* this function is also called when we get a cman config-update event */ @@ -156,11 +158,10 @@ void setup_logging(void) int mode, facility, priority; char file[PATH_MAX]; - /* The debug setting is special, it's used by the program - and not used to configure logsys. */ + memset(file, 0, PATH_MAX); read_ccs_logging(&mode, &facility, &priority, file); - logsys_conf("fenced", mode, facility, priority, file); + logsys_conf(DAEMON_NAME, mode, facility, priority, file); } void close_logging(void) diff --git a/fence/fenced/main.c b/fence/fenced/main.c index c16f074..d3737eb 100644 --- a/fence/fenced/main.c +++ b/fence/fenced/main.c @@ -845,9 +845,9 @@ static void read_arguments(int argc, char **argv) }; } - if (!optd_debug_logsys && getenv("FENCED_DEBUG_LOGSYS")) { + if (!optd_debug_logsys && getenv("FENCED_DEBUG")) { optd_debug_logsys = 1; - cfgd_debug_logsys = atoi(getenv("FENCED_DEBUG_LOGSYS")); + cfgd_debug_logsys = atoi(getenv("FENCED_DEBUG")); } } hooks/post-receive -- Cluster Project