Commit faf9ae5e authored by Jim Jagielski's avatar Jim Jagielski
Browse files

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
parent 556bf44e
Loading
Loading
Loading
Loading
+13 −4
Changes for modules/proxy/mod_proxy_balancer.c: 13 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -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;