]> granicus.if.org Git - apache/commitdiff
Add in additional logging and use correct formats
authorJim Jagielski <jim@apache.org>
Tue, 19 Aug 2008 17:28:00 +0000 (17:28 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 19 Aug 2008 17:28:00 +0000 (17:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@687099 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_balancer.c

index 31bec23255d21b499eac1be9f73b6304a51713b2..6a0303f8d1925d4972706ca5f60f8ff1001a8a44 100644 (file)
@@ -1038,6 +1038,10 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
 
     if (mycandidate) {
         mycandidate->s->lbstatus -= total_factor;
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                     "proxy: byrequests selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d",
+                     mycandidate->name, mycandidate->s->busy, mycandidate->s->lbstatus);
+
     }
 
     return mycandidate;
@@ -1116,6 +1120,13 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
         cur_lbset++;
     } while (cur_lbset <= max_lbset && !mycandidate);
 
+    if (mycandidate) {
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                     "proxy: bytraffic selected worker \"%s\" : busy %" APR_SIZE_T_FMT,
+                     mycandidate->name, mycandidate->s->busy);
+
+    }
+
     return mycandidate;
 }
 
@@ -1191,13 +1202,11 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer,
     } while (cur_lbset <= max_lbset && !mycandidate);
 
     if (mycandidate) {
-
+        mycandidate->s->lbstatus -= total_factor;
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                     "proxy: selected worker \"%s\" by busy factor %i (request lbstatus %i)",
+                     "proxy: bybusyness selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d",
                      mycandidate->name, mycandidate->s->busy, mycandidate->s->lbstatus);
 
-        mycandidate->s->lbstatus -= total_factor;
-
     }
 
     return mycandidate;