From 5086d45a1e477db25f8aa84a53dd3afd32cb0ceb Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 18 Jun 2017 02:42:06 +0200 Subject: consensus/set: saner log levels --- src/consensus/gnunet-service-consensus.c | 34 ++++++++++++++++---------------- src/set/gnunet-service-set_union.c | 16 +++++++-------- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c index 6b76efb18..990d94954 100644 --- a/src/consensus/gnunet-service-consensus.c +++ b/src/consensus/gnunet-service-consensus.c @@ -693,7 +693,7 @@ send_to_client_iter (void *cls, GNUNET_assert (GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT == element->element_type); ce = element->data; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "marker is %u\n", (unsigned) ce->marker); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "marker is %u\n", (unsigned) ce->marker); if (0 != ce->marker) return GNUNET_YES; @@ -988,7 +988,7 @@ set_result_cb (void *cls, if ( (NULL != consensus_element) && (0 != consensus_element->marker) ) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: got some marker\n", session->local_peer_idx); if ( (GNUNET_YES == setop->transceive_contested) && @@ -1002,7 +1002,7 @@ set_result_cb (void *cls, if (CONSENSUS_MARKER_SIZE == consensus_element->marker) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: got size marker\n", session->local_peer_idx); @@ -1018,7 +1018,7 @@ set_result_cb (void *cls, uint64_t *copy = GNUNET_memdup (session->first_sizes_received, sizeof (uint64_t) * session->num_peers); qsort (copy, session->num_peers, sizeof (uint64_t), cmp_uint64_t); session->lower_bound = copy[session->num_peers / 3 + 1]; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: lower bound %llu\n", session->local_peer_idx, (long long) session->lower_bound); @@ -1045,7 +1045,7 @@ set_result_cb (void *cls, NULL, NULL); #ifdef GNUNET_EXTRA_LOGGING - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: adding element %s into set {%s} of task {%s}\n", session->local_peer_idx, debug_str_element (element), @@ -1057,7 +1057,7 @@ set_result_cb (void *cls, { diff_insert (output_diff, 1, element); #ifdef GNUNET_EXTRA_LOGGING - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: adding element %s into diff {%s} of task {%s}\n", session->local_peer_idx, debug_str_element (element), @@ -1069,7 +1069,7 @@ set_result_cb (void *cls, { rfn_vote (output_rfn, task_other_peer (task), VOTE_ADD, element); #ifdef GNUNET_EXTRA_LOGGING - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: adding element %s into rfn {%s} of task {%s}\n", session->local_peer_idx, debug_str_element (element), @@ -1096,7 +1096,7 @@ set_result_cb (void *cls, NULL, NULL); #ifdef GNUNET_EXTRA_LOGGING - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: removing element %s from set {%s} of task {%s}\n", session->local_peer_idx, debug_str_element (element), @@ -1108,7 +1108,7 @@ set_result_cb (void *cls, { diff_insert (output_diff, -1, element); #ifdef GNUNET_EXTRA_LOGGING - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: removing element %s from diff {%s} of task {%s}\n", session->local_peer_idx, debug_str_element (element), @@ -1120,7 +1120,7 @@ set_result_cb (void *cls, { rfn_vote (output_rfn, task_other_peer (task), VOTE_REMOVE, element); #ifdef GNUNET_EXTRA_LOGGING - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: removing element %s from rfn {%s} of task {%s}\n", session->local_peer_idx, debug_str_element (element), @@ -1348,7 +1348,7 @@ commit_set (struct ConsensusSession *session, .size = 0, .sender_index = 0 }; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "inserting size marker\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "inserting size marker\n"); cse.ce.marker = CONSENSUS_MARKER_SIZE; cse.size = GNUNET_htonll (session->first_size); cse.sender_index = session->local_peer_idx; @@ -1424,7 +1424,7 @@ commit_set (struct ConsensusSession *session, } GNUNET_SET_add_element (set->h, &element, NULL, NULL); #ifdef GNUNET_EXTRA_LOGGING - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: evil peer: cramming element %s into set {%s} of task {%s}\n", session->local_peer_idx, debug_str_element (&element), @@ -1439,7 +1439,7 @@ commit_set (struct ConsensusSession *session, GNUNET_SET_commit (setop->op, set->h); break; case EVILNESS_SLACK: - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: evil peer: slacking\n", (unsigned int) session->local_peer_idx); /* Do nothing. */ @@ -1895,7 +1895,7 @@ task_start_apply_round (struct TaskEntry *task) ri->element, &set_mutation_done, progress_cls)); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: apply round: adding element %s with %u-majority.\n", session->local_peer_idx, debug_str_element (ri->element), majority_num); @@ -1907,13 +1907,13 @@ task_start_apply_round (struct TaskEntry *task) ri->element, &set_mutation_done, progress_cls)); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: apply round: deleting element %s with %u-majority.\n", session->local_peer_idx, debug_str_element (ri->element), majority_num); break; case VOTE_STAY: - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: apply round: keeping element %s with %u-majority.\n", session->local_peer_idx, debug_str_element (ri->element), majority_num); @@ -2382,7 +2382,7 @@ finish_task (struct TaskEntry *task) task->step->finished_tasks++; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "P%u: Finishing setop in Task {%s} (now %u/%u tasks finished in step)\n", task->step->session->local_peer_idx, debug_str_task_key (&task->key), diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index 3e18bf08e..077b899f6 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c @@ -769,7 +769,7 @@ send_full_element_iterator (void *cls, struct GNUNET_SET_Element *el = &ee->element; struct GNUNET_MQ_Envelope *ev; - LOG (GNUNET_ERROR_TYPE_INFO, + LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending element %s\n", GNUNET_h2s (key)); ev = GNUNET_MQ_msg_extra (emsg, @@ -796,7 +796,7 @@ send_full_set (struct Operation *op) struct GNUNET_MQ_Envelope *ev; op->state->phase = PHASE_FULL_SENDING; - LOG (GNUNET_ERROR_TYPE_INFO, + LOG (GNUNET_ERROR_TYPE_DEBUG, "Dedicing to transmit the full set\n"); /* FIXME: use a more memory-friendly way of doing this with an iterator, just as we do in the non-full case! */ @@ -924,7 +924,7 @@ handle_union_p2p_strata_estimator (void *cls, (diff > op->state->initial_size / 4) || (0 == other_size) ) { - LOG (GNUNET_ERROR_TYPE_INFO, + LOG (GNUNET_ERROR_TYPE_DEBUG, "Deciding to go for full set transmission (diff=%d, own set=%u)\n", diff, op->state->initial_size); @@ -941,7 +941,7 @@ handle_union_p2p_strata_estimator (void *cls, { struct GNUNET_MQ_Envelope *ev; - LOG (GNUNET_ERROR_TYPE_INFO, + LOG (GNUNET_ERROR_TYPE_DEBUG, "Telling other peer that we expect its full set\n"); op->state->phase = PHASE_EXPECT_IBF; ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SET_UNION_P2P_REQUEST_FULL); @@ -1299,7 +1299,7 @@ handle_union_p2p_ibf (void *cls, else { GNUNET_assert (op->state->phase == PHASE_EXPECT_IBF_CONT); - LOG (GNUNET_ERROR_TYPE_INFO, + LOG (GNUNET_ERROR_TYPE_DEBUG, "Received more of IBF\n"); } GNUNET_assert (NULL != op->state->remote_ibf); @@ -1761,7 +1761,7 @@ handle_union_p2p_inquiry (void *cls, const struct IBF_Key *ibf_key; unsigned int num_keys; - LOG (GNUNET_ERROR_TYPE_INFO, + LOG (GNUNET_ERROR_TYPE_DEBUG, "Received union inquiry\n"); num_keys = (ntohs (msg->header.size) - sizeof (struct InquiryMessage)) / sizeof (struct IBF_Key); @@ -1829,7 +1829,7 @@ handle_union_p2p_request_full (void *cls, { struct Operation *op = cls; - LOG (GNUNET_ERROR_TYPE_INFO, + LOG (GNUNET_ERROR_TYPE_DEBUG, "Received request for full set transmission\n"); if (GNUNET_SET_OPERATION_UNION != op->set->operation) { @@ -1910,7 +1910,7 @@ handle_union_p2p_full_done (void *cls, } break; default: - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Handle full done phase is %u\n", (unsigned) op->state->phase); GNUNET_break_op (0); -- cgit v1.2.3