]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Polished ICAP debugging so that users can see fatal ICAP service failures
authorrousskov <>
Thu, 2 Aug 2007 02:51:06 +0000 (02:51 +0000)
committerrousskov <>
Thu, 2 Aug 2007 02:51:06 +0000 (02:51 +0000)
(and not much more) at debug level 2. This may help identify why a service
is suspended.

src/ICAP/AsyncJob.cc
src/ICAP/ICAPModXact.cc
src/ICAP/ICAPXaction.cc

index ebe03172dfce70b303cca17e8ca4f741cc7f5df5..e59badb2643a2ecc72d2fdebcba12b3b3125e141 100644 (file)
@@ -79,7 +79,7 @@ bool AsyncJob::callStart(const char *method)
 
 void AsyncJob::callException(const TextException &e)
 {
-    debugs(93, 2, typeName << "::" << inCall << " caught an exception: " <<
+    debugs(93, 3, typeName << "::" << inCall << " caught an exception: " <<
            e.message << ' ' << status());
 
     mustStop("exception");
index 3e8466b7456b8c9edc2ece4f2634042674be5098..3fdd4be42f8d9be563f9867e99bb99c2435eebed 100644 (file)
@@ -420,7 +420,7 @@ void ICAPModXact::stopWriting(bool nicely)
             checkConsuming();
             return;
         }
-        debugs(93, 2, HERE << "will NOT wait for the last write" << status());
+        debugs(93, 3, HERE << "will NOT wait for the last write" << status());
 
         // Comm does not have an interface to clear the writer callback nicely,
         // but without clearing the writer we cannot recycle the connection.
@@ -589,7 +589,7 @@ void ICAPModXact::callException(const TextException &e)
     }
 
     try {
-        debugs(93, 2, "bypassing ICAPModXact::" << inCall << " exception: " <<
+        debugs(93, 3, "bypassing ICAPModXact::" << inCall << " exception: " <<
            e.message << ' ' << status());
         bypassFailure();
     }
index be6f2e560b4b2c9209b848743632505598af3cdb..545779f36cd2173e190eb0f5b6935019092e2c40 100644 (file)
@@ -207,9 +207,9 @@ void ICAPXaction::noteCommConnected(comm_err_t commStatus)
 }
 
 void ICAPXaction::dieOnConnectionFailure() {
+    debugs(93, 2, HERE << typeName <<
+        " failed to connect to " << service().uri);
     theService->noteFailure();
-    debugs(93,3, typeName << " failed to connect to the ICAP service at " <<
-        service().uri);
     throw TexcHere("cannot connect to the ICAP service");
 }
 
@@ -253,7 +253,7 @@ void ICAPXaction::noteCommTimedout()
 
 void ICAPXaction::handleCommTimedout()
 {
-    debugs(93, 2, HERE << typeName << " timeout with " <<
+    debugs(93, 2, HERE << typeName << " failed: timeout with " <<
         theService->methodStr() << " " << theService->uri.buf() << status());
     reuseConnection = false;
     service().noteFailure();