cluster: RHEL510 - cman: enable and document logging of CMAN subsystem

Jan Pokorný jpokorny at fedoraproject.org
Thu May 16 14:33:22 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=43c60106f4078699502771ff1be25c4bd6369f41
Commit:        43c60106f4078699502771ff1be25c4bd6369f41
Parent:        eaf31c53c822f73d31c4b4f2f586b27277ba9b10
Author:        Jan Pokorný <jpokorny at redhat.com>
AuthorDate:    Thu May 16 16:32:34 2013 +0200
Committer:     Jan Pokorný <jpokorny at redhat.com>
CommitterDate: Thu May 16 16:32:34 2013 +0200

cman: enable and document logging of CMAN subsystem

Resolves: rhbz#963251

Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
---
 cman/daemon/logging.c |    2 --
 cman/daemon/logging.h |   11 -----------
 cman/man/cman.5       |   17 +++++++++++------
 3 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/cman/daemon/logging.c b/cman/daemon/logging.c
index 461890b..4f6e731 100644
--- a/cman/daemon/logging.c
+++ b/cman/daemon/logging.c
@@ -55,7 +55,6 @@ void set_debuglog(int subsystems)
 	subsys_mask = subsystems;
 }
 
-#ifdef DEBUG
 void log_debug(int subsys, int stamp, const char *fmt, ...)
 {
 	va_list va;
@@ -96,4 +95,3 @@ void log_debug(int subsys, int stamp, const char *fmt, ...)
 	log_printf(LOG_LEVEL_DEBUG, log_buf);
 	va_end(va);
 }
-#endif
diff --git a/cman/daemon/logging.h b/cman/daemon/logging.h
index 839e62f..05a4685 100644
--- a/cman/daemon/logging.h
+++ b/cman/daemon/logging.h
@@ -15,8 +15,6 @@ extern void init_debug(int subsystems);
 void set_debuglog(int subsystems);
 
 /* Debug macros */
-#ifdef DEBUG
-
 #define CMAN_DEBUG_NONE    1
 #define CMAN_DEBUG_BARRIER 2
 #define CMAN_DEBUG_MEMB    4
@@ -29,12 +27,3 @@ extern void log_debug(int subsys, int stamp, const char *fmt, ...);
 #define P_MEMB(fmt, args...)    log_debug(CMAN_DEBUG_MEMB, 1, fmt, ## args)
 #define P_DAEMON(fmt, args...)  log_debug(CMAN_DEBUG_DAEMON, 1, fmt, ## args)
 #define P_AIS(fmt, args...)     log_debug(CMAN_DEBUG_AIS, 1, fmt, ## args)
-
-#else
-
-#define P_BARRIER(fmt, args...)
-#define P_MEMB(fmt, args...)
-#define P_DAEMON(fmt, args...)
-#define P_AIS(fmt, args...)
-
-#endif
diff --git a/cman/man/cman.5 b/cman/man/cman.5
index 0644295..a1d359f 100644
--- a/cman/man/cman.5
+++ b/cman/man/cman.5
@@ -1,5 +1,5 @@
 .\"
-.\"  Copyright (C) 2004-2007 Red Hat, Inc.  All rights reserved.
+.\"  Copyright (C) 2004-2013 Red Hat, Inc.  All rights reserved.
 
 .\" groff -t -e -mandoc -Tlatin1 cman.5 | less
 
@@ -189,13 +189,18 @@ Here's how to set the token timeout to five seconds:
 
 And this is how to add extra openais logging options to CMAN and CPG:
 
-  <logging to_stderr="yes">
-    <logger ident="CPG" debug="on" to_stderr="yes">
-    </logger>
-    <logger ident="CMAN" debug="on" to_stderr="yes">
-    </logger>
+  <logging>
+    <logger ident="CPG" debug="on"/>
+    <logger ident="CMAN" debug="on"/>
   </logging>
 
+For logging of CMAN subsystem specifically, one can add
+\fIdebug_mask\fR attribute to \fIcman\fR element in cluster.conf
+(or, alternatively, export CMAN_DEBUGLOG environment variable
+prior to execution) with a value as described in cman_tool(8),
+section \fBDEBUG OPTIONS\fR.  That man page also explains how
+to adjust the debug level at runtime.
+
 .in -7
 
 


More information about the cluster-commits mailing list