From 0344cadd69bd9f9580b8f11901bfb27599c68b67 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 28 Mar 2007 20:54:51 +0000 Subject: [PATCH] improved logging of bitfields --- src/peer_connection.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 903c06ad4..747e21e3e 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -703,7 +703,14 @@ namespace libtorrent #ifdef TORRENT_VERBOSE_LOGGING using namespace boost::posix_time; (*m_logger) << to_simple_string(second_clock::universal_time()) - << " <== BITFIELD\n"; + << " <== BITFIELD "; + + for (int i = 0; i < int(bitfield.size()); ++i) + { + if (bitfield[i]) (*m_logger) << "1"; + else (*m_logger) << "0"; + } + (*m_logger) << "\n"; #endif // if we don't have the metedata, we cannot