Quellcode durchsuchen

Add log service level.

(Logical change 1.96)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@349 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake vor 21 Jahren
Ursprung
Commit
0e0e2f2c9e
5 geänderte Dateien mit 19 neuen und 5 gelöschten Zeilen
  1. 3 1
      exec/ckpt.c
  2. 3 1
      exec/clm.c
  3. 3 1
      exec/evs.c
  4. 3 1
      exec/evt.c
  5. 7 1
      exec/gmi.c

+ 3 - 1
exec/ckpt.c

@@ -53,9 +53,11 @@
 #include "util.h"
 #include "util.h"
 #include "parse.h"
 #include "parse.h"
 #include "main.h"
 #include "main.h"
-#include "print.h"
 #include "gmi.h"
 #include "gmi.h"
 
 
+#define LOG_SERVICE LOG_SERVICE_CKPT
+#include "print.h"
+
 DECLARE_LIST_INIT(checkpointListHead);
 DECLARE_LIST_INIT(checkpointListHead);
 
 
 DECLARE_LIST_INIT(checkpointIteratorListHead);
 DECLARE_LIST_INIT(checkpointIteratorListHead);

+ 3 - 1
exec/clm.c

@@ -56,10 +56,12 @@
 #include "gmi.h"
 #include "gmi.h"
 #include "parse.h"
 #include "parse.h"
 #include "main.h"
 #include "main.h"
-#include "print.h"
 #include "mempool.h"
 #include "mempool.h"
 #include "handlers.h"
 #include "handlers.h"
 
 
+#define LOG_SERVICE LOG_SERVICE_CLM
+#include "print.h"
+
 SaClmClusterChangesT thisClusterNodeLastChange = SA_CLM_NODE_JOINED;
 SaClmClusterChangesT thisClusterNodeLastChange = SA_CLM_NODE_JOINED;
 SaClmClusterNodeT thisClusterNode;
 SaClmClusterNodeT thisClusterNode;
 
 

+ 3 - 1
exec/evs.c

@@ -56,10 +56,12 @@
 #include "gmi.h"
 #include "gmi.h"
 #include "parse.h"
 #include "parse.h"
 #include "main.h"
 #include "main.h"
-#include "print.h"
 #include "mempool.h"
 #include "mempool.h"
 #include "handlers.h"
 #include "handlers.h"
 
 
+#define LOG_SERVICE LOG_SERVICE_EVS
+#include "print.h"
+
 static DECLARE_LIST_INIT (confchg_notify);
 static DECLARE_LIST_INIT (confchg_notify);
 
 
 /*
 /*

+ 3 - 1
exec/evt.c

@@ -49,12 +49,14 @@
 #include "mempool.h"
 #include "mempool.h"
 #include "parse.h"
 #include "parse.h"
 #include "main.h"
 #include "main.h"
-#include "print.h"
 #include "gmi.h"
 #include "gmi.h"
 #include "hdb.h"
 #include "hdb.h"
 #include "clm.h"
 #include "clm.h"
 #include "evt.h"
 #include "evt.h"
 
 
+#define LOG_SERVICE LOG_SERVICE_EVT
+#include "print.h"
+
 static int message_handler_req_lib_activatepoll (struct conn_info *conn_info, 
 static int message_handler_req_lib_activatepoll (struct conn_info *conn_info, 
 		void *message);
 		void *message);
 static int lib_evt_open_channel(struct conn_info *conn_info, void *message);
 static int lib_evt_open_channel(struct conn_info *conn_info, void *message);

+ 7 - 1
exec/gmi.c

@@ -1246,6 +1246,7 @@ static int netif_determine (struct sockaddr_in *bindnet,
 	free (ifc.ifc_buf);
 	free (ifc.ifc_buf);
 	close (id_fd);
 	close (id_fd);
 	
 	
+printf ("res is %d\n", res);
 	return (res);
 	return (res);
 }
 }
 
 
@@ -1434,6 +1435,7 @@ static int messages_free (int group_arut)
 	int i;
 	int i;
 	int res;
 	int res;
 	int lesser;
 	int lesser;
+	int log_release = 0;
 
 
 // TODO printf ("group arut %d last_group-arut  %d gmi_dut %d barrier %d\n", group_arut, last_group_arut, gmi_dut, gmi_barrier_seq);
 // TODO printf ("group arut %d last_group-arut  %d gmi_dut %d barrier %d\n", group_arut, last_group_arut, gmi_dut, gmi_barrier_seq);
 	/*
 	/*
@@ -1470,9 +1472,13 @@ static int messages_free (int group_arut)
 		}
 		}
 		sq_items_release (&queue_rtr_items, i);
 		sq_items_release (&queue_rtr_items, i);
 		last_released = i + 1;
 		last_released = i + 1;
+		log_release = 1;
 	}
 	}
 
 
-	gmi_log_printf (gmi_log_level_debug, "releasing messages up to and including %d\n", lesser);
+	if (log_release) {
+		gmi_log_printf (gmi_log_level_debug,
+			"releasing messages up to and including %d\n", lesser);
+	}
 	return (0);
 	return (0);
 }
 }