From: Christian Grothoff Date: Thu, 27 May 2010 12:14:51 +0000 (+0000) Subject: nicer logging X-Git-Tag: initial-import-from-subversion-38251~21547 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d4ba6f055c65ca1b2cbf49cd4b935bf9bb966649;p=oweals%2Fgnunet.git nicer logging --- diff --git a/src/core/core_api.c b/src/core/core_api.c index 1e17d0f5f..4af9aebfd 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -430,8 +430,10 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg) em = (const struct GNUNET_MessageHeader *) &ntm[1]; #if DEBUG_CORE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Received message of type %u from peer `%4s'\n", - ntohs (em->type), GNUNET_i2s (&ntm->peer)); + "Received message of type %u and size %u from peer `%4s'\n", + ntohs (em->type), + ntohs (em->size), + GNUNET_i2s (&ntm->peer)); #endif if ((GNUNET_NO == h->inbound_hdr_only) && (msize != ntohs (em->size) + sizeof (struct NotifyTrafficMessage))) diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index bb7a506cb..cdd2b857e 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -3167,8 +3167,9 @@ deliver_message (struct Neighbour *sender, type = ntohs (m->type); #if DEBUG_CORE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Received encapsulated message of type %u from `%4s'\n", + "Received encapsulated message of type %u and size %u from `%4s'\n", (unsigned int) type, + ntohs (m->size), GNUNET_i2s (&sender->peer)); #endif GNUNET_snprintf (buf, @@ -3602,7 +3603,7 @@ neighbour_quota_update (void *cls, #if DEBUG_CORE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Neighbour quota update calculation running for peer `%4s'\n" + "Neighbour quota update calculation running for peer `%4s'\n", GNUNET_i2s (&n->peer)); #endif n->quota_update_task = GNUNET_SCHEDULER_NO_TASK;