From: Jim Jagielski Date: Tue, 19 Aug 2008 17:28:00 +0000 (+0000) Subject: Add in additional logging and use correct formats X-Git-Tag: 2.3.0~343 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=383a1d2cd1642d1baee662cac0660afb8fc316a4;p=thirdparty%2Fapache%2Fhttpd.git Add in additional logging and use correct formats git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@687099 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 31bec23255d..6a0303f8d19 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -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;