From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.06-36-gde57092
Date: 21 Jul 2008 16:09:50 -0000 [thread overview]
Message-ID: <20080721160950.5945.qmail@sourceware.org> (raw)
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 <teigland@redhat.com>
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 <teigland@redhat.com>
-----------------------------------------------------------------------
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 <daemon>.log
logging/debug=on: errors continue going to syslog (/var/log/messages)
- and fenced.log, debug messages are added to fenced.log. */
+ and <daemon>.log, debug messages are added to <daemon>.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
reply other threads:[~2008-07-21 16:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080721160950.5945.qmail@sourceware.org \
--to=teigland@sourceware.org \
/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).