Messages which are flow messages, rather then lifecycle are now logged in trace level. Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx> --- exec/cpg.c | 4 ++-- exec/main.c | 1 + exec/totemsrp.c | 15 +++++++++------ include/corosync/totem/totem.h | 1 + 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/exec/cpg.c b/exec/cpg.c index d9af287..695f311 100644 --- a/exec/cpg.c +++ b/exec/cpg.c @@ -1813,7 +1813,7 @@ static void message_handler_req_lib_cpg_mcast (void *conn, const void *message) int result; cs_error_t error = CS_ERR_NOT_EXIST; - log_printf(LOGSYS_LEVEL_DEBUG, "got mcast request on %p", conn); + log_printf(LOGSYS_LEVEL_TRACE, "got mcast request on %p", conn); switch (cpd->cpd_state) { case CPD_STATE_UNJOINED: @@ -1867,7 +1867,7 @@ static void message_handler_req_lib_cpg_zc_execute ( int result; cs_error_t error = CS_ERR_NOT_EXIST; - log_printf(LOGSYS_LEVEL_DEBUG, "got ZC mcast request on %p", conn); + log_printf(LOGSYS_LEVEL_TRACE, "got ZC mcast request on %p", conn); header = (struct qb_ipc_request_header *)(((char *)serveraddr2void(hdr->server_address) + sizeof (struct coroipcs_zc_header))); req_lib_cpg_mcast = (struct req_lib_cpg_mcast *)header; diff --git a/exec/main.c b/exec/main.c index 0fa256e..c21f47f 100644 --- a/exec/main.c +++ b/exec/main.c @@ -1163,6 +1163,7 @@ int main (int argc, char **argv, char **envp) totem_config.totem_logging_configuration.log_level_warning = LOGSYS_LEVEL_WARNING; totem_config.totem_logging_configuration.log_level_notice = LOGSYS_LEVEL_NOTICE; totem_config.totem_logging_configuration.log_level_debug = LOGSYS_LEVEL_DEBUG; + totem_config.totem_logging_configuration.log_level_trace = LOGSYS_LEVEL_TRACE; totem_config.totem_logging_configuration.log_printf = _logsys_log_printf; logsys_config_apply(); diff --git a/exec/totemsrp.c b/exec/totemsrp.c index 8a7c12c..8f9f243 100644 --- a/exec/totemsrp.c +++ b/exec/totemsrp.c @@ -426,6 +426,8 @@ struct totemsrp_instance { int totemsrp_log_level_debug; + int totemsrp_log_level_trace; + int totemsrp_subsys_id; void (*totemsrp_log_printf) ( @@ -818,6 +820,7 @@ int totemsrp_initialize ( instance->totemsrp_log_level_warning = totem_config->totem_logging_configuration.log_level_warning; instance->totemsrp_log_level_notice = totem_config->totem_logging_configuration.log_level_notice; instance->totemsrp_log_level_debug = totem_config->totem_logging_configuration.log_level_debug; + instance->totemsrp_log_level_trace = totem_config->totem_logging_configuration.log_level_trace; instance->totemsrp_subsys_id = totem_config->totem_logging_configuration.log_subsys_id; instance->totemsrp_log_printf = totem_config->totem_logging_configuration.log_printf; @@ -1771,7 +1774,7 @@ static void memb_state_operational_enter (struct totemsrp_instance *instance) deliver_messages_from_recovery_to_regular (instance); - log_printf (instance->totemsrp_log_level_debug, + log_printf (instance->totemsrp_log_level_trace, "Delivering to app %x to %x", instance->my_high_delivered + 1, instance->old_ring_state_high_seq_received); @@ -2298,7 +2301,7 @@ int totemsrp_mcast ( message_item.msg_len = addr_idx; - log_printf (instance->totemsrp_log_level_debug, "mcasted message added to pending queue"); + log_printf (instance->totemsrp_log_level_trace, "mcasted message added to pending queue"); instance->stats.mcast_tx++; cs_queue_item_add (&instance->new_message_queue, &message_item); @@ -2420,7 +2423,7 @@ static void messages_free ( instance->last_released += range; if (log_release) { - log_printf (instance->totemsrp_log_level_debug, + log_printf (instance->totemsrp_log_level_trace, "releasing messages up to and including %x", release_to); } } @@ -3760,7 +3763,7 @@ static void messages_deliver_to_app ( range = end_point - instance->my_high_delivered; if (range) { - log_printf (instance->totemsrp_log_level_debug, + log_printf (instance->totemsrp_log_level_trace, "Delivering %x to %x", instance->my_high_delivered, end_point); } @@ -3829,7 +3832,7 @@ static void messages_deliver_to_app ( /* * Message found */ - log_printf (instance->totemsrp_log_level_debug, + log_printf (instance->totemsrp_log_level_trace, "Delivering MCAST message with seq %x to pending delivery queue", mcast_header.seq); @@ -3919,7 +3922,7 @@ static int message_handler_mcast ( return (0); } - log_printf (instance->totemsrp_log_level_debug, + log_printf (instance->totemsrp_log_level_trace, "Received ringid(%s:%lld) seq %x", totemip_print (&mcast_header.ring_id.rep), mcast_header.ring_id.seq, diff --git a/include/corosync/totem/totem.h b/include/corosync/totem/totem.h index 08a459e..11fb581 100644 --- a/include/corosync/totem/totem.h +++ b/include/corosync/totem/totem.h @@ -82,6 +82,7 @@ struct totem_logging_configuration { int log_level_warning; int log_level_notice; int log_level_debug; + int log_level_trace; int log_subsys_id; }; -- 1.7.1 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss