From 7bde9ef4a961613b5fe98bdd5e4de23bc0e496ce Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 12 May 2008 07:01:25 +0000 Subject: [PATCH] improved debug logging in regression tests --- test/setup_transfer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index 12b7fccfe..a59f8637b 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -27,10 +27,16 @@ void print_alerts(libtorrent::session& ses, char const* name, bool allow_disconn a = ses.pop_alert(); while (a.get()) { - if (a->msg() != "block downloading" + if (peer_disconnected_alert* p = dynamic_cast(a.get())) + { + std::cerr << name << "(" << p->ip << "): " << p->msg() << "\n"; + } + else if (a->msg() != "block downloading" && a->msg() != "block finished" && a->msg() != "piece finished") + { std::cerr << name << ": " << a->msg() << "\n"; + } TEST_CHECK(dynamic_cast(a.get()) == 0 || (!handles.empty() && h.is_seed()) || a->msg() == "connecting to peer"