diff --git a/exec/totemnet.c b/exec/totemnet.c index 59c8a3ed..b1f19c4f 100644 --- a/exec/totemnet.c +++ b/exec/totemnet.c @@ -63,6 +63,8 @@ #include #include #include +#define LOGSYS_UTILS_ONLY 1 +#include #include "totemnet.h" #include "wthread.h" @@ -242,13 +244,11 @@ static void totemnet_instance_initialize (struct totemnet_instance *instance) instance->my_memb_entries = 1; } -#define RECID_LOG UINT_MAX - 1 - #define log_printf(level, format, args...) \ do { \ instance->totemnet_log_printf (instance->totemnet_subsys_id, \ __FUNCTION__, __FILE__, __LINE__, \ - level, RECID_LOG, (const char *)format, ##args); \ + level, LOGSYS_RECID_LOG, (const char *)format, ##args); \ } while (0); diff --git a/exec/totempg.c b/exec/totempg.c index bb34451c..7565805a 100644 --- a/exec/totempg.c +++ b/exec/totempg.c @@ -99,6 +99,8 @@ #include #include #include +#define LOGSYS_UTILS_ONLY 1 +#include #include "totemmrp.h" #include "totemsrp.h" @@ -237,12 +239,11 @@ static pthread_mutex_t callback_token_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t mcast_msg_mutex = PTHREAD_MUTEX_INITIALIZER; -#define RECID_LOG UINT_MAX - 1 - #define log_printf(level, format, args...) \ do { \ totempg_log_printf (totempg_subsys_id, __FUNCTION__, \ - __FILE__, __LINE__, level, RECID_LOG, format, ##args); \ + __FILE__, __LINE__, level, LOGSYS_RECID_LOG, \ + format, ##args); \ } while (0); static int msg_count_send_ok (int msg_count); diff --git a/exec/totemrrp.c b/exec/totemrrp.c index 6ad24c23..e0d19cab 100644 --- a/exec/totemrrp.c +++ b/exec/totemrrp.c @@ -63,6 +63,8 @@ #include #include #include +#define LOGSYS_UTILS_ONLY 1 +#include #include "totemnet.h" #include "totemrrp.h" @@ -468,14 +470,12 @@ struct rrp_algo *rrp_algos[] = { */ DECLARE_HDB_DATABASE (totemrrp_instance_database,NULL); -#define RECID_LOG UINT_MAX - 1 - #define log_printf(level, format, args...) \ do { \ rrp_instance->totemrrp_log_printf ( \ rrp_instance->totemrrp_subsys_id, \ - __FUNCTION__, __FILE__, __LINE__, level, RECID_LOG, \ - format, ##args); \ + __FUNCTION__, __FILE__, __LINE__, level, \ + LOGSYS_RECID_LOG, format, ##args); \ } while (0); /* diff --git a/exec/totemsrp.c b/exec/totemsrp.c index 19beb421..e14e3776 100644 --- a/exec/totemsrp.c +++ b/exec/totemsrp.c @@ -77,6 +77,9 @@ #include #include #include +#define LOGSYS_UTILS_ONLY 1 +#include + #include "totemsrp.h" #include "totemrrp.h" #include "totemnet.h" @@ -622,13 +625,11 @@ struct message_handlers totemsrp_message_handlers = { static const char *rundir = NULL; -#define RECID_LOG UINT_MAX - 1 - #define log_printf(level, format, args...) \ do { \ instance->totemsrp_log_printf (instance->totemsrp_subsys_id, \ - __FUNCTION__, __FILE__, __LINE__, level, RECID_LOG, \ - format, ##args); \ + __FUNCTION__, __FILE__, __LINE__, level, \ + LOGSYS_RECID_LOG, format, ##args); \ } while (0); static void totemsrp_instance_initialize (struct totemsrp_instance *instance) diff --git a/include/corosync/engine/logsys.h b/include/corosync/engine/logsys.h index c2fe08a1..ea53cac1 100644 --- a/include/corosync/engine/logsys.h +++ b/include/corosync/engine/logsys.h @@ -104,6 +104,8 @@ extern "C" { #define LOGSYS_MAX_SUBSYS_COUNT 64 #define LOGSYS_MAX_SUBSYS_NAMELEN 64 +#ifndef LOGSYS_UTILS_ONLY + extern int _logsys_system_setup( const char *mainsystem, unsigned int mode, @@ -377,6 +379,8 @@ do { \ LOGSYS_RECID_TRACE8, format, ##args); \ } while(0) +#endif /* LOGSYS_UTILS_ONLY */ + #ifdef __cplusplus } #endif