--------------------- PatchSet 1537 Date: 2005/08/19 23:14:32 Author: dwsquid Branch: squid3-icap Tag: (none) Log: change debugging levels Members: src/ICAPAnchor.cc:1.1.2.6->1.1.2.7 src/http.cc:1.49.2.5->1.49.2.6 Index: squid3/src/ICAPAnchor.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPAnchor.cc,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid3/src/ICAPAnchor.cc 19 Aug 2005 22:56:36 -0000 1.1.2.6 +++ squid3/src/ICAPAnchor.cc 19 Aug 2005 23:14:32 -0000 1.1.2.7 @@ -14,7 +14,7 @@ ICAPAnchor::ICAPAnchor(): virgin(NULL), adapted(NULL) { -debug(0,0)("ICAPAnchor constructed, this=%p\n", this); + debug(93,5)("ICAPAnchor constructed, this=%p\n", this); } ICAPAnchor::~ICAPAnchor() { @@ -48,7 +48,7 @@ } void ICAPAnchor::sendMoreData(StoreIOBuffer buf) { - debug(0,0)("ICAPAnchor::sendMoreData() called\n"); + debug(93,5)("ICAPAnchor::sendMoreData() called\n"); //buf.dump(); #if MSG_PIPE_USES_MEM_HDR virgin->data->body->write(buf); @@ -60,7 +60,7 @@ // HttpStateData says we have the entire HTTP message void ICAPAnchor::doneSending() { - debug(0,0)("ICAPAnchor::doneSending() called\n"); + debug(93,5)("ICAPAnchor::doneSending() called\n"); #if ICAP_ANCHOR_LOOPBACK /* LOOPBACK */ @@ -75,34 +75,34 @@ // HttpStateData tells us to abort void ICAPAnchor::ownerAbort() { - debug(0,0)("ICAPAnchor::ownerAbort() called\n"); + debug(93,5)("ICAPAnchor::ownerAbort() called\n"); stop(notifyIcap); } // ICAP client needs more virgin response data void ICAPAnchor::noteSinkNeed(MsgPipe *p) { - debug(0,0)("ICAPAnchor::noteSinkNeed() called\n"); + debug(93,5)("ICAPAnchor::noteSinkNeed() called\n"); //1) tell HttpStateData to resume reading (in case it has stopped due to full buffers, etc.) //2) check that HttpStateData is reading (or we will get stuck w/o progress) } // ICAP client aborting void ICAPAnchor::noteSinkAbort(MsgPipe *p) { - debug(0,0)("ICAPAnchor::noteSinkNeed() called\n"); + debug(93,5)("ICAPAnchor::noteSinkNeed() called\n"); stop(notifyOwner); } // ICAP client starts sending adapted response // ICAP client has received new HTTP headers (if any) at this point void ICAPAnchor::noteSourceStart(MsgPipe *p) { - debug(0,0)("ICAPAnchor::noteSourceStart() called\n"); + debug(93,5)("ICAPAnchor::noteSourceStart() called\n"); httpState->takeAdaptedHeaders(adapted->data->header); noteSourceProgress(p); } // ICAP client sends more data void ICAPAnchor::noteSourceProgress(MsgPipe *p) { - debug(0,0)("ICAPAnchor::noteSourceProgress() called\n"); + debug(93,5)("ICAPAnchor::noteSourceProgress() called\n"); //tell HttpStateData to store a fresh portion of the adapted response if (p->data->body->contentSize()) { httpState->takeAdaptedBody(p->data->body); @@ -111,7 +111,7 @@ // ICAP client is done sending adapted response void ICAPAnchor::noteSourceFinish(MsgPipe *p) { - debug(0,0)("ICAPAnchor::noteSourceFinish() called\n"); + debug(93,5)("ICAPAnchor::noteSourceFinish() called\n"); //tell HttpStateData that we expect no more response data httpState->doneAdapting(); stop(notifyNone); @@ -119,7 +119,7 @@ // ICAP client is aborting void ICAPAnchor::noteSourceAbort(MsgPipe *p) { - debug(0,0)("ICAPAnchor::noteSourceAbort() called\n"); + debug(93,5)("ICAPAnchor::noteSourceAbort() called\n"); stop(notifyOwner); } Index: squid3/src/http.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/http.cc,v retrieving revision 1.49.2.5 retrieving revision 1.49.2.6 diff -u -r1.49.2.5 -r1.49.2.6 --- squid3/src/http.cc 19 Aug 2005 22:57:41 -0000 1.49.2.5 +++ squid3/src/http.cc 19 Aug 2005 23:15:59 -0000 1.49.2.6 @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.49.2.5 2005/08/19 22:57:41 dwsquid Exp $ + * $Id: http.cc,v 1.49.2.6 2005/08/19 23:15:59 dwsquid Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -922,12 +922,12 @@ reply->content_length); /* If we haven't seen the end of reply headers, we are not done */ -debug(0,0)("persistentConnStatus: flags.headers_parsed=%d\n", flags.headers_parsed); + debug(11,5)("persistentConnStatus: flags.headers_parsed=%d\n", flags.headers_parsed); if (!flags.headers_parsed) return INCOMPLETE_MSG; clen = httpReplyBodySize(request->method, reply); -debug(0,0)("persistentConnStatus: clen=%d\n", clen); + debug(11,5)("persistentConnStatus: clen=%d\n", clen); /* If there is no message body, we can be persistent */ if (0 == clen) @@ -940,7 +940,7 @@ /* If the body size is known, we must wait until we've gotten all of it. */ /* old technique: * if (entry->mem_obj->endOffset() < reply->content_length + reply->hdr_sz) */ -debug(0,0)("persistentConnStatus: body_bytes_read=%d, content_length=%d\n", + debug(11,5)("persistentConnStatus: body_bytes_read=%d, content_length=%d\n", body_bytes_read, reply->content_length); if (body_bytes_read < reply->content_length) return INCOMPLETE_MSG; @@ -1179,7 +1179,7 @@ switch (persistentConnStatus()) { case INCOMPLETE_MSG: -debug(0,0)("processReplyData: INCOMPLETE_MSG\n"); + debug(11,5)("processReplyData: INCOMPLETE_MSG\n"); /* Wait for more data or EOF condition */ if (flags.keepalive_broken) { @@ -1192,7 +1192,7 @@ break; case COMPLETE_PERSISTENT_MSG: -debug(0,0)("processReplyData: COMPLETE_PERSISTENT_MSG\n"); + debug(11,5)("processReplyData: COMPLETE_PERSISTENT_MSG\n"); /* yes we have to clear all these! */ commSetTimeout(fd, -1, NULL, NULL); flags.do_next_read = 0; @@ -1212,7 +1212,7 @@ return; case COMPLETE_NONPERSISTENT_MSG: -debug(0,0)("processReplyData: COMPLETE_NONPERSISTENT_MSG\n"); + debug(11,5)("processReplyData: COMPLETE_NONPERSISTENT_MSG\n"); #if REALLY /* close the connection ourselves */ @@ -1993,7 +1993,7 @@ int HttpStateData::doIcap() { -debug(0,0)("HttpStateData::doIcap() called\n"); + debug(11,5)("HttpStateData::doIcap() called\n"); icap = new ICAPAnchor; (void) cbdataReference(icap); return 0; @@ -2002,7 +2002,7 @@ void HttpStateData::takeAdaptedHeaders(HttpReply *rep) { -debug(0,0)("HttpStateData::takeAdaptedHeaders() called\n"); + debug(11,5)("HttpStateData::takeAdaptedHeaders() called\n"); storeEntryReplaceObject(entry, rep); /* * NOTE: reply and rep point to the same thing because we passed @@ -2016,9 +2016,9 @@ void HttpStateData::takeAdaptedBody(MemBuf *buf) { - debug(0,0)("HttpStateData::takeAdaptedBody() called\n"); - debug(0,0)("\t%d bytes\n", buf->contentSize()); - debug(0,0)("\t%d is current offset\n", (int)currentOffset); + debug(11,5)("HttpStateData::takeAdaptedBody() called\n"); + debug(11,5)("\t%d bytes\n", buf->contentSize()); + debug(11,5)("\t%d is current offset\n", (int)currentOffset); entry->write(StoreIOBuffer(buf, currentOffset)); currentOffset += buf->contentSize(); } @@ -2026,7 +2026,7 @@ void HttpStateData::doneAdapting() { -debug(0,0)("HttpStateData::doneAdapting() called\n"); + debug(11,5)("HttpStateData::doneAdapting() called\n"); fwdComplete(fwd); httpStateFree(-1, this); }