From: Alex Rousskov Date: Fri, 14 Dec 2012 16:10:05 +0000 (-0700) Subject: Polished helper messages debugging slightly. X-Git-Tag: SQUID_3_4_0_1~438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8289d5a9beadc6ca204e7ef7c091f5986860ebe6;p=thirdparty%2Fsquid.git Polished helper messages debugging slightly. Made stateful and stateless debugging a little bit more similar/symmetric. Debug helperStatefulSubmit message contents length. Debug accumulated helperStatefulHandleRead buffer. Polished helperHandleRead buffer debugging. --- diff --git a/src/helper.cc b/src/helper.cc index 99043c9822..0539c58861 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -415,7 +415,7 @@ helperSubmit(helper * hlp, const char *buf, HLPCB * callback, void *data) else Enqueue(hlp, r); - debugs(84, 9, "helperSubmit: " << buf); + debugs(84, DBG_DATA, Raw("buf", buf, strlen(buf))); } /// lastserver = "server last used as part of a reserved request sequence" @@ -457,7 +457,8 @@ helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPCB * callback, vo StatefulEnqueue(hlp, r); } - debugs(84, 9, "helperStatefulSubmit: placeholder: '" << r->placeholder << "', buf '" << buf << "'."); + debugs(84, DBG_DATA, "placeholder: '" << r->placeholder << + "', " << Raw("buf", buf, strlen(buf))); } /** @@ -914,7 +915,7 @@ helperHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t len, com srv->roffset += len; srv->rbuf[srv->roffset] = '\0'; - debugs(84, 9, "helperHandleRead: '" << srv->rbuf << "'"); + debugs(84, DBG_DATA, Raw("accumulated", srv->rbuf, srv->roffset)); if (!srv->stats.pending) { /* someone spoke without being spoken to */ @@ -1011,6 +1012,7 @@ helperStatefulHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t srv->roffset += len; srv->rbuf[srv->roffset] = '\0'; r = srv->request; + debugs(84, DBG_DATA, Raw("accumulated", srv->rbuf, srv->roffset)); if (r == NULL) { /* someone spoke without being spoken to */