From 383a1d2cd1642d1baee662cac0660afb8fc316a4 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Tue, 19 Aug 2008 17:28:00 +0000 Subject: [PATCH] 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 --- modules/proxy/mod_proxy_balancer.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 31bec23255..6a0303f8d1 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; -- 2.50.1