Przeglądaj źródła

Fix totem logging after logsys changes

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2181 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabio M. Di Nitto 17 lat temu
rodzic
commit
f96d62d0f2
5 zmienionych plików z 14 dodań i 12 usunięć
  1. 3 2
      exec/totemnet.c
  2. 3 3
      exec/totempg.c
  3. 3 3
      exec/totemrrp.c
  4. 3 3
      exec/totemsrp.c
  5. 2 1
      include/corosync/totem/totem.h

+ 3 - 2
exec/totemnet.c

@@ -156,8 +156,9 @@ struct totemnet_instance {
 		const char *function,
 		const char *file,
 		int line, unsigned int level,
+		unsigned int tag,
 		const char *format,
-		...)__attribute__((format(printf, 6, 7)));
+		...)__attribute__((format(printf, 7, 8)));
 
 	hdb_handle_t handle;
 
@@ -242,7 +243,7 @@ static void totemnet_instance_initialize (struct totemnet_instance *instance)
 do {									\
         instance->totemnet_log_printf (instance->totemnet_subsys_id,	\
                 __FUNCTION__, __FILE__, __LINE__,			\
-		level, (const char *)format, ##args);			\
+		level, 0, (const char *)format, ##args);		\
 } while (0);
 
 

+ 3 - 3
exec/totempg.c

@@ -159,8 +159,8 @@ static int totempg_log_level_notice;
 static int totempg_log_level_debug;
 static int totempg_subsys_id;
 static void (*totempg_log_printf) (int subsys_id, const char *function,
-	const char *file, int line, unsigned int level,
-	const char *format, ...) __attribute__((format(printf, 6, 7)));
+	const char *file, int line, unsigned int level, unsigned int tag,
+	const char *format, ...) __attribute__((format(printf, 7, 8)));
 
 struct totem_config *totempg_totem_config;
 
@@ -239,7 +239,7 @@ static pthread_mutex_t mcast_msg_mutex = PTHREAD_MUTEX_INITIALIZER;
 #define log_printf(level, format, args...)				\
 do {									\
         totempg_log_printf (totempg_subsys_id, __FUNCTION__,		\
-		__FILE__, __LINE__, level, format, ##args);		\
+		__FILE__, __LINE__, level, 0, format, ##args);		\
 } while (0);
 
 static int msg_count_send_ok (int msg_count);

+ 3 - 3
exec/totemrrp.c

@@ -208,8 +208,8 @@ struct totemrrp_instance {
 	int totemrrp_subsys_id;
 
 	void (*totemrrp_log_printf) (int subsys, const char *function,
-		const char *file, int line, unsigned int level,
-		const char *format, ...)__attribute__((format(printf, 6, 7)));
+		const char *file, int line, unsigned int level, unsigned int tag,
+		const char *format, ...)__attribute__((format(printf, 7, 8)));
 
 	hdb_handle_t handle;
 
@@ -473,7 +473,7 @@ DECLARE_HDB_DATABASE (totemrrp_instance_database,NULL);
 do {									\
 	rrp_instance->totemrrp_log_printf (				\
 		rrp_instance->totemrrp_subsys_id,			\
-		__FUNCTION__, __FILE__, __LINE__, level,		\
+		__FUNCTION__, __FILE__, __LINE__, level, 0,		\
 		format, ##args);					\
 } while (0);
 

+ 3 - 3
exec/totemsrp.c

@@ -435,8 +435,8 @@ struct totemsrp_instance {
 
 	void (*totemsrp_log_printf) (int subsys,
 		const char *function, const char *file,
-		int line, unsigned int level,
-		const char *format, ...)__attribute__((format(printf, 6, 7)));;
+		int line, unsigned int level, unsigned int tag,
+		const char *format, ...)__attribute__((format(printf, 7, 8)));;
 
 	enum memb_state memb_state;
 
@@ -622,7 +622,7 @@ static const char *rundir = NULL;
 #define log_printf(level, format, args...)				\
 do {									\
 	instance->totemsrp_log_printf (instance->totemsrp_subsys_id,	\
-		__FUNCTION__, __FILE__, __LINE__, level,		\
+		__FUNCTION__, __FILE__, __LINE__, level, 0,		\
 		format, ##args);					\
 } while (0);
 

+ 2 - 1
include/corosync/totem/totem.h

@@ -64,8 +64,9 @@ struct totem_logging_configuration {
                 const char *file_name,
                 int file_line,
                 unsigned int level,
+		unsigned int tag,
                 const char *format,
-                ...) __attribute__((format(printf, 6, 7)));
+                ...) __attribute__((format(printf, 7, 8)));
 
 	int log_level_security;
 	int log_level_error;