]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Clenup various code to use debugs() insted of debug()()
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 21 Sep 2008 13:35:17 +0000 (01:35 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 21 Sep 2008 13:35:17 +0000 (01:35 +1200)
src/ESIElement.h
src/cache_manager.cc
src/comm.cc
src/url.cc

index 36bfbdbe5b8512313a7f494d4d37fba4d775a855..7924a63c4af467ac4a3cc63ad88aa57495f3a75f 100644 (file)
@@ -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;
     }
 
index e1b817114097ff32ea1ec38728609d6005d176f8..7d05187c1e4969e70fb57cbc418e8dffb7a9fd02 100644 (file)
@@ -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);
 }
index 788ef4b03290fd922337f15d4eaeb69370eabde4..be7834c38f1625d67700a975367b934eead63c98 100644 (file)
@@ -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)
index e911d3bef8720a8dc782ede9c20ed4693ff1fb87..00eabb11786e90805fe399741e219774b59d4f4a 100644 (file)
@@ -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;
     }