From: Amos Jeffries Date: Sun, 21 Sep 2008 13:35:17 +0000 (+1200) Subject: Clenup various code to use debugs() insted of debug()() X-Git-Tag: SQUID_3_1_0_1~49^2~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e680134c41773f811313a257e13c366d99480957;p=thirdparty%2Fsquid.git Clenup various code to use debugs() insted of debug()() --- diff --git a/src/ESIElement.h b/src/ESIElement.h index 36bfbdbe5b..7924a63c4a 100644 --- a/src/ESIElement.h +++ b/src/ESIElement.h @@ -87,7 +87,7 @@ public: virtual bool addElement(ESIElement::Pointer) { /* Don't accept children */ - debug (86,5)("ESIElement::addElement: Failed for %p\n",this); + debugs(86,5, "ESIElement::addElement: Failed for " << this); return false; } @@ -95,7 +95,7 @@ public: /* process this element */ virtual esiProcessResult_t process (int dovars) { - debug (86,5) ("esiProcessComplete: Processed %p\n",this); + debugs(86,5, "esiProcessComplete: Processed " << this); return ESI_PROCESS_COMPLETE; } diff --git a/src/cache_manager.cc b/src/cache_manager.cc index e1b8171140..7d05187c1e 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -377,7 +377,7 @@ CacheManager::ShutdownAction::ShutdownAction() : CacheManagerAction("shutdown"," void CacheManager::ReconfigureAction::run(StoreEntry * sentry) { - debug(16, DBG_IMPORTANT) ("Reconfigure by Cache Manager command.\n"); + debugs(16, DBG_IMPORTANT, "Reconfigure by Cache Manager command."); storeAppendPrintf(sentry, "Reconfiguring Squid Process ...."); reconfigure(SIGHUP); } diff --git a/src/comm.cc b/src/comm.cc index 788ef4b032..be7834c38f 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1886,23 +1886,23 @@ commSetTcpKeepalive(int fd, int idle, int interval, int timeout) if (timeout && interval) { int count = (timeout + interval - 1) / interval; if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &count, sizeof(on)) < 0) - debug(5, 1) ("commSetKeepalive: FD %d: %s\n", fd, xstrerror()); + debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } #endif #ifdef TCP_KEEPIDLE if (idle) { if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(on)) < 0) - debug(5, 1) ("commSetKeepalive: FD %d: %s\n", fd, xstrerror()); + debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } #endif #ifdef TCP_KEEPINTVL if (interval) { if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(on)) < 0) - debug(5, 1) ("commSetKeepalive: FD %d: %s\n", fd, xstrerror()); + debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } #endif if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof(on)) < 0) - debug(5, 1) ("commSetKeepalive: FD %d: %s\n", fd, xstrerror()); + debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } void @@ -2174,8 +2174,7 @@ comm_listen(int sock) { #ifdef SO_ACCEPTFILTER struct accept_filter_arg afa; bzero(&afa, sizeof(afa)); - debug(5, 0) ("Installing accept filter '%s' on FD %d\n", - Config.accept_filter, sock); + debugs(5, DBG_CRITICAL, "Installing accept filter '" << Config.accept_filter << "' on FD " << sock); xstrncpy(afa.af_name, Config.accept_filter, sizeof(afa.af_name)); x = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)); if (x < 0) diff --git a/src/url.cc b/src/url.cc index e911d3bef8..00eabb1178 100644 --- a/src/url.cc +++ b/src/url.cc @@ -357,7 +357,7 @@ urlParse(const HttpRequestMethod& method, char *url, HttpRequest *request) /* reject duplicate or leading dots */ if (strstr(host, "..") || *host == '.') { - debug(23, 1) ("urlParse: Illegal hostname '%s'\n", host); + debugs(23, 1, "urlParse: Illegal hostname '" << host << "'"); return NULL; }