]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Debug display of peer selection choices
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 19 Jun 2011 13:52:55 +0000 (07:52 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 19 Jun 2011 13:52:55 +0000 (07:52 -0600)
src/peer_select.cc

index c5e13566bf54feb8180f32875414cbf0df57c438..9c3e28f6f69a1e4f62333408dc187aa9a739d9b8 100644 (file)
@@ -210,11 +210,17 @@ peerSelectDnsPaths(ps_state *psstate)
 
     if (psstate->paths->size() < 1) {
         debugs(44, DBG_IMPORTANT, "Failed to select source for '" << psstate->entry->url() << "'" );
-        debugs(44, DBG_IMPORTANT, "  always_direct = " << psstate->always_direct  );
-        debugs(44, DBG_IMPORTANT, "   never_direct = " << psstate->never_direct  );
+        debugs(44, DBG_IMPORTANT, "  always_direct = " << (psstate->always_direct==1?"YES":(psstate->always_direct==0?"NO":"maybe")));
+        debugs(44, DBG_IMPORTANT, "   never_direct = " << (psstate->never_direct==1?"YES":(psstate->never_direct==0?"NO":"maybe")));
         debugs(44, DBG_IMPORTANT, "       timedout = " << psstate->ping.timedout  );
     } else {
-        debugs(44, 2, "Found IP destination for: " << psstate->entry->url() << "'");
+        debugs(44, 2, "Found sources for '" << psstate->entry->url() << "'" );
+        debugs(44, 2, "  always_direct = " << (psstate->always_direct?"YES":(psstate->always_direct==0?"NO":"maybe")));
+        for (size_t i = 0; i < psstate->paths->size(); i++) {
+            debugs(44, 2, "   cache_peer = " << (*psstate->paths)[i]);
+        }
+        debugs(44, 2, "   never_direct = " << (psstate->never_direct?"YES":(psstate->never_direct==0?"NO":"maybe")));
+        debugs(44, 2, "       timedout = " << psstate->ping.timedout  );
     }
 
     psstate->ping.stop = current_time;