From 94b11502cb83deff82e1b765f652a192ba1c47ca Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Wed, 14 Dec 2011 16:42:25 +1100 Subject: [PATCH] LOG: get the logging to work from loaded quorum modules Signed-off-by: Angus Salkeld Reviewed-by: Steven Dake --- exec/service.c | 5 +++-- exec/vsf_quorum.c | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/exec/service.c b/exec/service.c index 3e3b1b3e..5f14e7a6 100644 --- a/exec/service.c +++ b/exec/service.c @@ -205,11 +205,12 @@ unsigned int corosync_service_link_and_init ( ais_service[service->id] = service; - /* begin */ + /* + * Register the log sites with libqb + */ _start = lcr_ifact_addr_get(handle, "__start___verbose"); _stop = lcr_ifact_addr_get(handle, "__stop___verbose"); qb_log_callsites_register(_start, _stop); - /* end */ if (service->config_init_fn) { res = service->config_init_fn (corosync_api); diff --git a/exec/vsf_quorum.c b/exec/vsf_quorum.c index ede7786d..d038eb6e 100644 --- a/exec/vsf_quorum.c +++ b/exec/vsf_quorum.c @@ -284,6 +284,8 @@ static int quorum_exec_init_fn (struct corosync_api_v1 *api) char *quorum_module; int res; void *quorum_iface_p; + void* _start; + void* _stop; #ifdef COROSYNC_SOLARIS logsys_subsys_init(); @@ -328,6 +330,13 @@ static int quorum_exec_init_fn (struct corosync_api_v1 *api) log_printf (LOGSYS_LEVEL_NOTICE, "Using quorum provider %s\n", quorum_module); + /* + * Register the log sites with libqb + */ + _start = lcr_ifact_addr_get(q_handle, "__start___verbose"); + _stop = lcr_ifact_addr_get(q_handle, "__stop___verbose"); + qb_log_callsites_register(_start, _stop); + quorum_iface = (struct quorum_services_api_ver1 *)quorum_iface_p; quorum_iface->init (api, quorum_api_set_quorum); }