cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] conga/ricci include/Logger.h modules/cluster/c ...
@ 2007-09-26 21:35 rmccabe
  0 siblings, 0 replies; only message in thread
From: rmccabe @ 2007-09-26 21:35 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-09-26 21:35:20

Modified files:
	ricci/include  : Logger.h 
	ricci/modules/cluster/clumon/src/daemon: main.cpp 

Log message:
	Set the log mask to LogAll when debug is enabled

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/include/Logger.h.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/daemon/main.cpp.diff?cvsroot=cluster&r1=1.7&r2=1.8

--- conga/ricci/include/Logger.h	2007/09/18 21:01:00	1.5
+++ conga/ricci/include/Logger.h	2007/09/26 21:35:20	1.6
@@ -27,17 +27,19 @@
 #include "String.h"
 
 enum LogLevel {
-	LogNone			= 0,
-	LogBasic		= 1,
-	LogMonitor		= 2,
-	LogSocket		= 4,
-	LogCommunicator	= 8,
-	LogTransfer		= 16,
-	LogExit			= 32,
-	LogThread		= 64,
-	LogTime			= 128,
-	LogExecute		= 256,
-	LogAll			= ~0
+	LogNone			= 0x00000000,
+	LogBasic		= 0x00000001,
+	LogMonitor		= 0x00000002,
+	LogSocket		= 0x00000004,
+	LogCommunicator	= 0x00000008,
+	LogTransfer		= 0x00000010,
+	LogExit			= 0x00000020,
+	LogThread		= 0x00000040,
+	LogTime			= 0x00000080,
+	LogExecute		= 0x00000100,
+	LogExecFail		= 0x00000200,
+	LogDebug		= 0x00000400,
+	LogAll			= 0xffffffff
 };
 
 class Logger
@@ -51,11 +53,12 @@
 		ssize_t log(const String& msg, LogLevel level=LogBasic);
 		ssize_t log_sigsafe(const char* msg, LogLevel level=LogBasic);
 		void operator<< (const String& msg) { log(msg); }
+		uint32_t get_mask(void) { return _level; }
 
 	private:
 		int _fd;
 		char *_domain_c;
-		int _level;
+		uint32_t _level;
 
 		void close_fd();
 
--- conga/ricci/modules/cluster/clumon/src/daemon/main.cpp	2007/09/18 20:16:27	1.7
+++ conga/ricci/modules/cluster/clumon/src/daemon/main.cpp	2007/09/26 21:35:20	1.8
@@ -95,8 +95,12 @@
 	}
 
 	if (v_level < 0) {
-		cout << "Setting verbosity level to LogBasic" << endl;
-		v_level = LogBasic;
+		if (debug) {
+			cout << "Setting verbosity level to LogAll" << endl;
+		} else {
+			cout << "Setting verbosity level to LogBasic" << endl;
+			v_level = LogBasic;
+		}
 	}
 
 	if (foreground)



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-26 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 21:35 [Cluster-devel] conga/ricci include/Logger.h modules/cluster/c rmccabe

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).