From ff752ca3069dbdd6b13252bb1d40ed2acc4f85e9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 15 Feb 2010 21:39:38 +0000 Subject: reduce debug logging --- src/transport/gnunet-service-transport.c | 6 ++++-- src/transport/plugin_transport_tcp.c | 4 ++-- src/transport/transport.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 70144e8c1..b7848be40 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -1763,7 +1763,9 @@ handle_pong (void *cls, const struct GNUNET_MessageHeader *message, const char *sender_address, size_t sender_address_len) { -#if DEBUG_TRANSPORT +#if DEBUG_TRANSPORT > 1 + /* we get tons of these that just get discarded, only log + if we are quite verbose */ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving `%s' message from `%4s'.\n", "PONG", GNUNET_i2s (peer)); @@ -1780,7 +1782,7 @@ handle_pong (void *cls, const struct GNUNET_MessageHeader *message, per PING, and all but the first PONG will end up here. So really we should not print anything here unless we want to be very, very verbose... */ -#if DEBUG_TRANSPORT > 1 +#if DEBUG_TRANSPORT > 2 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message from `%4s' but have no record of a matching `%s' message. Ignoring.\n", "PONG", diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index ee7641d39..05a7c2eb0 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -39,7 +39,7 @@ #include "plugin_transport.h" #include "transport.h" -#define DEBUG_TCP GNUNET_YES +#define DEBUG_TCP GNUNET_NO /** * How long until we give up on transmitting the welcome message? @@ -522,7 +522,7 @@ disconnect_session (struct Session *session) #if DEBUG_TCP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", - "Notifying transport service about loss of data connection with `%4s'.\n", + "Notifying transport service about loss of connection with `%4s'.\n", GNUNET_i2s (&session->target)); #endif /* Data session that actually went past the initial handshake; diff --git a/src/transport/transport.h b/src/transport/transport.h index 603f1bbc1..89f004ab8 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h @@ -30,7 +30,7 @@ #include "gnunet_time_lib.h" #include "gnunet_transport_service.h" -#define DEBUG_TRANSPORT GNUNET_YES +#define DEBUG_TRANSPORT GNUNET_NO /** * For how long do we allow unused bandwidth -- cgit v1.2.3