Skip to contentSkip to conversation

Cluster Project branch, master, updated. cluster-2.99.04-58-ga2f1025

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=a2f1025d6e1595475afcdcd68d6f8205ecf99412

The branch, master has been updated

       via  a2f1025d6e1595475afcdcd68d6f8205ecf99412 (commit)
      from  0b8bd69b8f6a393958229551396057ac44ca5391 (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 a2f1025d6e1595475afcdcd68d6f8205ecf99412

Author: Fabio M. Di Nitto <[email protected]>
Date:   Mon Jun 23 15:09:33 2008 +0200

[MISC] Logging: optimizing query sequence

Query for debug info only if nothing is specified on the command line.

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

Summary of changes:

 ccs/daemon/misc.c |   65 ++++++++++++++++++++----------------------
 cman/qdisk/main.c |   81 +++++++++++++++++++++++++++--------------------------
 2 files changed, 72 insertions(+), 74 deletions(-)
ccs/daemon/misc.c +31 -34
index acab5c8..76f63de 100644
@@ -166,22 +166,22 @@ 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;
-  }
+  if(!debug) {
+    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) {
+    res = do_simple_xml_query(ctx, "/cluster/logging/logger_subsys[@subsys=\"CCS\"]/@debug");
+    if(res) {
       if(!strcmp(res, "on")) {
 	debug = 1;
       } else
@@ -189,28 +189,25 @@ int set_ccs_logging(xmlDocPtr ldoc){
 	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);
+      free(res);
+      res=NULL;
+    } else
+      debug = global_debug; /* global debug overrides subsystem only if latter is not specified */
 
-  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;
+    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);
+      if(!debug)
+	logsys_config_priority_set (loglevel);
 
-    log_printf(LOG_DEBUG, "syslog_level: %s (%d).\n", res, loglevel);
-    free(res);
-    res=NULL;
-  }
+      free(res);
+      res=NULL;
+    }
+  } else
+    logsys_config_priority_set (LOG_LEVEL_DEBUG);
 
   res = do_simple_xml_query(ctx, "/cluster/logging/@to_stderr");
   if(res) {
cman/qdisk/main.c +41 -40

100 lines not on this page · raw message

hooks/post-receive
--
Cluster Project