logging improvements

This commit is contained in:
Arvid Norberg 2008-04-20 17:17:58 +00:00
parent 39eaf766fa
commit a4b69e5b2d
2 changed files with 11 additions and 2 deletions

View File

@ -526,7 +526,14 @@ namespace libtorrent
// optimization, don't send have messages
// to peers that already have the piece
if (!m_ses.settings().send_redundant_have
&& has_piece(index)) return;
&& has_piece(index))
{
#ifdef TORRENT_VERBOSE_LOGGING
(*m_logger) << time_now_string()
<< " ==> HAVE [ piece: " << index << " ] SUPRESSED\n";
#endif
return;
}
#ifdef TORRENT_VERBOSE_LOGGING
(*m_logger) << time_now_string()

View File

@ -1149,7 +1149,9 @@ namespace libtorrent
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
(*m_ses.m_logger) << time_now_string() << " *** PIECE_FINISHED [ p: "
<< index << " chk: " << (passed_hash_check?"passed":"failed") << " ]\n";
<< index << " chk: " << ((passed_hash_check == 0)
?"passed":passed_hash_check == -1
?"disk failed":"failed") << " ]\n";
#endif
bool was_seed = is_seed();