Skip to contentSkip to conversation

Cluster Project branch, master, updated. cluster-2.99.04-57-g0b8bd69

Cluster-devel [email protected] 1 participant 1 message Jun 23, 2008

lore
Share & tools
lore
#0 lore 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=0b8bd69b8f6a393958229551396057ac44ca5391

The branch, master has been updated

       via  0b8bd69b8f6a393958229551396057ac44ca5391 (commit)
       via  4d6472e59640d2594c5d9101b1ca7cc6ee1c952e (commit)
       via  8b317c5b251513a0825d8c0ccd85aa7b246a5b19 (commit)
      from  06be5b42ff670cbb9177a72c9ac43ac10caa8d7d (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 0b8bd69b8f6a393958229551396057ac44ca5391

Author: Fabio M. Di Nitto <[email protected]>
Date:   Mon Jun 23 13:59:56 2008 +0200

[QDISK] Port qdisk to the new logsys config interface

NOTE: this commit also retain backward compatibility with the old logging config options but warns the users that they are depracated.

commit 4d6472e59640d2594c5d9101b1ca7cc6ee1c952e

Author: Fabio M. Di Nitto <[email protected]>
Date:   Mon Jun 23 13:34:18 2008 +0200

[CCS] Fix debug override from command line vs config

commit 8b317c5b251513a0825d8c0ccd85aa7b246a5b19

Author: Fabio M. Di Nitto <[email protected]>
Date:   Mon Jun 23 11:38:32 2008 +0200

[CCS] Always check for debug setting as first thing

This allow us to enable and read debugging output as soon as possible.

-----------------------------------------------------------------------

Summary of changes:

 ccs/daemon/misc.c |   92 ++++++++++++------------
 cman/qdisk/main.c |  199 ++++++++++++++++++++++++++++++++++++++++++++---------
 2 files changed, 213 insertions(+), 78 deletions(-)
ccs/daemon/misc.c +46 -46
index 5ba999f..acab5c8 100644
@@ -166,6 +166,52 @@ int set_ccs_logging(xmlDocPtr ldoc){
 
   logmode = logsys_config_mode_get();
 
+  res = do_simple_xml_query(ctx, "/cluster/logging/@debug");
+  if(res) {
+    if(!strcmp(res, "on")) {
+      global_debug = 1;
+    } else
+    if(!strcmp(res, "off")) {
+      global_debug = 0;
+    } else
+      log_printf(LOG_ERR, "global debug: unknown value\n");
+    free(res);
+    res=NULL;
+  }
+
+  res = do_simple_xml_query(ctx, "/cluster/logging/logger_subsys[@subsys=\"CCS\"]/@debug");
+  if(res) {
+    if(!debug) {
+      if(!strcmp(res, "on")) {
+	debug = 1;
+      } else
+      if(!strcmp(res, "off")) { /* debug from cmdline/envvars override config */
+	debug = 0;
+      } else
+	log_printf(LOG_ERR, "subsys debug: unknown value\n");
+    }
+    free(res);
+    res=NULL;
+  } else
+    debug = global_debug; /* global debug overrides subsystem only if latter is not specified */
+
+  if(debug)
+    logsys_config_priority_set (LOG_LEVEL_DEBUG);
+
+  res = do_simple_xml_query(ctx, "/cluster/logging/logger_subsys[@subsys=\"CCS\"]/@syslog_level");
+  if(res) {
+    loglevel = logsys_priority_id_get (res);
+    if (loglevel < 0)
+      loglevel = LOG_LEVEL_INFO;
+
+    if (!debug)
+      logsys_config_priority_set (loglevel);
+
+    log_printf(LOG_DEBUG, "syslog_level: %s (%d).\n", res, loglevel);
+    free(res);
+    res=NULL;
+  }
+
   res = do_simple_xml_query(ctx, "/cluster/logging/@to_stderr");
   if(res) {
     if(!strcmp(res, "yes")) {
@@ -228,52 +274,6 @@ int set_ccs_logging(xmlDocPtr ldoc){
     res=NULL;
   }
 
-  res = do_simple_xml_query(ctx, "/cluster/logging/@debug");
-  if(res) {
-    if(!strcmp(res, "on")) {
-      global_debug = 1;
-    } else
-    if(!strcmp(res, "off")) {
-      global_debug = 0;
-    } else
-      log_printf(LOG_ERR, "debug: unknown value\n");
-    free(res);
-    res=NULL;
-  }
-
-  /* subsytem config */
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logger_subsys[@subsys=\"CCS\"]/@debug");
-  if(res) {
-    if(!strcmp(res, "on")) {
-      debug = 1;
-    } else
-    if(!strcmp(res, "off") && !debug) { /* debug from cmdline/envvars override config */
-      debug = 0;
-    } else
-      log_printf(LOG_ERR, "debug: unknown value\n");
-    free(res);
-    res=NULL;
-  } else
-    debug = global_debug; /* global debug overrides subsystem only if latter is not specified */
-
-  if(debug)
-    logsys_config_priority_set (LOG_LEVEL_DEBUG);
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logger_subsys[@subsys=\"CCS\"]/@syslog_level");
-  if(res) {
-    loglevel = logsys_priority_id_get (res);
-    if (loglevel < 0)
-      loglevel = LOG_LEVEL_INFO;
-
-    if (!debug)
-      logsys_config_priority_set (loglevel);
-
-    log_printf(LOG_DEBUG, "syslog_level: %s (%d).\n", res, loglevel);
-    free(res);
-    res=NULL;
-  }
-
   if(ctx){
     xmlXPathFreeContext(ctx);
   }
cman/qdisk/main.c +167 -32

238 lines not on this page · raw message

hooks/post-receive
--
Cluster Project