From: Amos Jeffries Date: Mon, 29 Aug 2011 03:47:54 +0000 (+1200) Subject: Bug 3319: Inconsistencies in error messages X-Git-Tag: take08~35^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30c48b1ae0bcf2da5feb51dbe15999940cbea17d;p=thirdparty%2Fsquid.git Bug 3319: Inconsistencies in error messages --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 39cdc30943..274505aee0 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -877,8 +877,7 @@ HttpHeader::addEntry(HttpHeaderEntry * e) assert_eid(e->id); assert(e->name.size()); - debugs(55, 9, this << " adding entry: " << e->id << " at " << - entries.count); + debugs(55, 7, HERE << this << " adding entry: " << e->id << " at " << entries.count); if (CBIT_TEST(mask, e->id)) Headers[e->id].stat.repCount++; @@ -900,8 +899,7 @@ HttpHeader::insertEntry(HttpHeaderEntry * e) assert(e); assert_eid(e->id); - debugs(55, 7, this << " adding entry: " << e->id << " at " << - entries.count); + debugs(55, 7, HERE << this << " adding entry: " << e->id << " at " << entries.count); if (CBIT_TEST(mask, e->id)) Headers[e->id].stat.repCount++; diff --git a/src/client_side.cc b/src/client_side.cc index 0ef0442094..0c14993c46 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -3420,7 +3420,7 @@ httpsAccept(int, const Comm::ConnectionPointer& details, comm_err_t flag, int xe if (!(ssl = httpsCreate(details, sslContext))) return; - debugs(33, 5, HERE << details << " accepted, starting SSL negotiation."); + debugs(33, 4, HERE << details << " accepted, starting SSL negotiation."); fd_note(details->fd, "client https connect"); if (s->http.tcp_keepalive.enabled) { diff --git a/src/http.cc b/src/http.cc index b740534d5a..96b90574c8 100644 --- a/src/http.cc +++ b/src/http.cc @@ -2212,12 +2212,12 @@ HttpStateData::finishingBrokenPost() } if (!Comm::IsConnOpen(serverConnection)) { - debugs(11,2, HERE << "ignoring broken POST for closed " << serverConnection); + debugs(11, 3, HERE << "ignoring broken POST for closed " << serverConnection); assert(closeHandler != NULL); return true; // prevent caller from proceeding as if nothing happened } - debugs(11, 2, "finishingBrokenPost: fixing broken POST"); + debugs(11, 3, "finishingBrokenPost: fixing broken POST"); typedef CommCbMemFunT Dialer; requestSender = JobCallback(11,5, Dialer, this, HttpStateData::wroteLast); diff --git a/src/icmp/Icmp4.cc b/src/icmp/Icmp4.cc index f506d7ace4..5c24f6d23e 100644 --- a/src/icmp/Icmp4.cc +++ b/src/icmp/Icmp4.cc @@ -141,7 +141,7 @@ Icmp4::SendEcho(Ip::Address &to, int opcode, const char *payload, int len) ((sockaddr_in*)S->ai_addr)->sin_port = 0; assert(icmp_pktsize <= MAX_PKT4_SZ); - debugs(42, 2, HERE << "Send ICMP packet to " << to << "."); + debugs(42, 5, HERE << "Send ICMP packet to " << to << "."); x = sendto(icmp_sock, (const void *) pkt, diff --git a/src/ssl/ssl_crtd.cc b/src/ssl/ssl_crtd.cc index cf10d767fb..354d62ef99 100644 --- a/src/ssl/ssl_crtd.cc +++ b/src/ssl/ssl_crtd.cc @@ -123,6 +123,8 @@ static size_t parseBytesUnits(const char * unit) if (!strncasecmp(unit, B_GBYTES_STR, strlen(B_GBYTES_STR))) return 1 << 30; + std::cerr << "WARNING: Unknown bytes unit '" << unit << "'" << std::endl; + return 0; } diff --git a/src/tools.cc b/src/tools.cc index a53ec4b7a3..b50c292c4c 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1050,7 +1050,7 @@ setSystemLimits(void) #if HAVE_SETRLIMIT && defined(RLIMIT_VMEM) if (getrlimit(RLIMIT_VMEM, &rl) < 0) { - debugs(50, 0, "getrlimit: RLIMIT_VMEM: " << xstrerror()); + debugs(50, DBG_CRITICAL, "getrlimit: RLIMIT_VMEM: " << xstrerror()); } else if (rl.rlim_max > rl.rlim_cur) { rl.rlim_cur = rl.rlim_max; /* set it to the max */ @@ -1073,7 +1073,7 @@ squid_signal(int sig, SIGHDLR * func, int flags) sigemptyset(&sa.sa_mask); if (sigaction(sig, &sa, NULL) < 0) - debugs(50, 0, "sigaction: sig=" << sig << " func=" << func << ": " << xstrerror()); + debugs(50, DBG_CRITICAL, "sigaction: sig=" << sig << " func=" << func << ": " << xstrerror()); #else #if _SQUID_MSWIN_ diff --git a/src/wccp.cc b/src/wccp.cc index 33dac22e16..cefcbe2286 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -139,12 +139,12 @@ wccpConnectionOpen(void) } if ( !Config.Wccp.router.SetIPv4() ) { - debugs(1, 1, "WCCPv1 Disabled. Router " << Config.Wccp.router << " is not IPv4."); + debugs(80, DBG_CRITICAL, "WCCPv1 Disabled. Router " << Config.Wccp.router << " is not an IPv4 address."); return; } if ( !Config.Wccp.address.SetIPv4() ) { - debugs(1, 1, "WCCPv1 Disabled. Local address " << Config.Wccp.address << " is not IPv4."); + debugs(80, DBG_CRITICAL, "WCCPv1 Disabled. Local address " << Config.Wccp.address << " is not an IPv4 address."); return; } diff --git a/src/wccp2.cc b/src/wccp2.cc index 4e952aa09b..35aeb6c738 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -985,12 +985,12 @@ wccp2ConnectionOpen(void) debugs(80, 5, "wccp2ConnectionOpen: Called"); if (wccp2_numrouters == 0 || !wccp2_service_list_head) { - debugs(80, 2, "WCCPv2 Disabled."); + debugs(80, 2, "WCCPv2 Disabled. No IPv4 Router(s) configured."); return; } if ( !Config.Wccp2.address.SetIPv4() ) { - debugs(80, 0, "WCCPv2 Disabled. " << Config.Wccp2.address << " is not an IPv4 address."); + debugs(80, DBG_CRITICAL, "WCCPv2 Disabled. Local address " << Config.Wccp2.address << " is not an IPv4 address."); return; } @@ -2135,7 +2135,7 @@ parse_wccp2_service(void *v) service_id = GetInteger(); if (service_id < 0 || service_id > 255) { - debugs(80, 0, "wccp2ParseServiceInfo: service info id " << service_id << " is out of range (0..255)"); + debugs(80, DBG_CRITICAL, "ERROR: invalid WCCP service id " << service_id << " (must be between 0 .. 255)"); self_destruct(); } @@ -2306,7 +2306,7 @@ parse_wccp2_service_info(void *v) service_id = GetInteger(); if (service_id < 0 || service_id > 255) { - debugs(80, 1, "parse_wccp2_service_info: invalid service id " << service_id << " (must be between 0 .. 255)"); + debugs(80, DBG_CRITICAL, "ERROR: invalid WCCP service id " << service_id << " (must be between 0 .. 255)"); self_destruct(); }