[PATCH] Fix redispatch information in logs

From: Krzysztof Oledzki <ole#ans.pl>
Date: Tue, 25 Dec 2007 05:06:42 +0100


From 227206d2f11feb3b52909f86917f0a560d343871 Mon Sep 17 00:00:00 2001 From: Krzysztof Piotr Oledzki <ole#ans.pl> Date: Tue, 25 Dec 2007 05:01:15 +0100
Subject: [BUG] Fix redispatch information in logs

The '+' sign should be prefixed not suffixed as most tools accept such numbers.

---
 src/log.c        |    4 ++--
 src/proto_http.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/log.c b/src/log.c
index b9a9778..5f63de3 100644
--- a/src/log.c
+++ b/src/log.c
@@ -356,7 +356,7 @@ void tcp_sess_log(struct session *s)
 
 	send_log(prx_log, LOG_INFO, "%s:%d [%02d/%s/%04d:%02d:%02d:%02d.%03d]"
 		 " %s %s/%s %d/%d/%s%d %s%lld"
-		 " %c%c %d/%d/%d/%d/%u%s %d/%d\n",
+		 " %c%c %d/%d/%d/%d/%s%u %d/%d\n",
 		 pn,

(s->cli_addr.ss_family == AF_INET) ?
ntohs(((struct sockaddr_in *)&s->cli_addr)->sin_port) : @@ -371,8 +371,8 @@ void tcp_sess_log(struct session *s) sess_term_cond[(s->flags & SN_ERR_MASK) >> SN_ERR_SHIFT], sess_fin_state[(s->flags & SN_FINST_MASK) >> SN_FINST_SHIFT], actconn, fe->feconn, be->beconn, s->srv ? s->srv->cur_sess : 0, - (s->conn_retries>0)?(be->conn_retries - s->conn_retries):be->conn_retries,
(s->conn_retries==-1)?"+":"",
+ (s->conn_retries>0)?(be->conn_retries - s->conn_retries):be->conn_retries, s->logs.srv_queue_size, s->logs.prx_queue_size); s->logs.logwait = 0; diff --git a/src/proto_http.c b/src/proto_http.c index 2c794ca..d2c22f4 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -769,7 +769,7 @@ static void http_sess_log(struct session *s) send_log(prx_log, LOG_INFO, "%s:%d [%02d/%s/%04d:%02d:%02d:%02d.%03d]" " %s %s/%s %d/%d/%d/%d/%s%d %d %s%lld" - " %s %s %c%c%c%c %d/%d/%d/%d/%u%s %d/%d%s\n", + " %s %s %c%c%c%c %d/%d/%d/%d/%s%u %d/%d%s\n", pn,
(s->cli_addr.ss_family == AF_INET) ?
ntohs(((struct sockaddr_in *)&s->cli_addr)->sin_port) : @@ -791,8 +791,8 @@ static void http_sess_log(struct session *s)
(be->options & PR_O_COOK_ANY) ? sess_cookie[(txn->flags & TX_CK_MASK) >> TX_CK_SHIFT] : '-',
(be->options & PR_O_COOK_ANY) ? sess_set_cookie[(txn->flags & TX_SCK_MASK) >> TX_SCK_SHIFT] : '-',
actconn, fe->feconn, be->beconn, s->srv ? s->srv->cur_sess : 0, - (s->conn_retries>0)?(be->conn_retries - s->conn_retries):be->conn_retries,
(s->conn_retries==-1)?"+":"",
+ (s->conn_retries>0)?(be->conn_retries - s->conn_retries):be->conn_retries, s->logs.srv_queue_size, s->logs.prx_queue_size, tmpline); s->logs.logwait = 0; -- 1.5.3.7
Received on 2007/12/25 05:06

This archive was generated by hypermail 2.2.0 : 2007/12/25 05:15 CET