From e02369182f073da2147fc3ff090249929492ba87 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 6 Aug 2012 19:21:57 +0200 Subject: [PATCH] Changed all level-1 debugs messages to use DBG_IMPORTANT definition. --- src/DiskIO/AIO/AIODiskFile.cc | 8 +-- src/DiskIO/AIO/aio_win32.cc | 8 +-- .../DiskDaemon/DiskDaemonDiskIOModule.cc | 2 +- src/DiskIO/DiskDaemon/DiskdFile.cc | 8 +-- src/DiskIO/DiskDaemon/DiskdIOStrategy.cc | 18 +++--- src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc | 2 +- src/DiskIO/DiskThreads/aiops.cc | 6 +- src/DiskIO/DiskThreads/aiops_win32.cc | 6 +- src/DiskIO/DiskThreads/async_io.cc | 2 +- src/DiskIO/IpcIo/IpcIoFile.cc | 12 ++-- src/DiskIO/Mmapped/MmappedFile.cc | 4 +- src/HttpHeader.cc | 20 +++--- src/HttpMsg.cc | 4 +- src/HttpRequest.cc | 2 +- src/HttpRequestMethod.cc | 4 +- src/LeakFinder.cc | 4 +- src/LoadableModules.cc | 4 +- src/MemObject.cc | 16 ++--- src/Server.cc | 2 +- src/StoreMeta.cc | 2 +- src/StoreMetaMD5.cc | 2 +- src/StoreMetaURL.cc | 4 +- src/SwapDir.cc | 2 +- src/WinSvc.cc | 18 +++--- src/acl/Acl.cc | 4 +- src/acl/Asn.cc | 4 +- src/adaptation/Config.cc | 2 +- src/adaptation/ecap/ServiceRep.cc | 2 +- src/adaptation/icap/History.cc | 2 +- src/adaptation/icap/ServiceRep.cc | 12 ++-- src/auth/AclMaxUserIp.cc | 4 +- src/auth/digest/auth_digest.cc | 2 +- src/auth/negotiate/UserRequest.cc | 2 +- src/auth/ntlm/UserRequest.cc | 2 +- src/cache_cf.cc | 32 +++++----- src/client_db.cc | 2 +- src/client_side.cc | 38 ++++++------ src/client_side_reply.cc | 20 +++--- src/comm.cc | 30 ++++----- src/comm/ModKqueue.cc | 2 +- src/comm/ModPoll.cc | 4 +- src/comm/ModSelect.cc | 4 +- src/comm/ModSelectWin32.cc | 4 +- src/comm/TcpAcceptor.cc | 2 +- src/comm/Write.cc | 2 +- src/disk.cc | 8 +-- src/dns.cc | 2 +- src/dns_internal.cc | 62 +++++++++---------- src/esi/Esi.cc | 12 ++-- src/esi/Expression.cc | 40 ++++++------ src/esi/Include.cc | 6 +- src/eui/Eui48.cc | 6 +- src/fd.cc | 4 +- src/forward.cc | 6 +- src/fqdncache.cc | 14 ++--- src/fs/coss/store_dir_coss.cc | 28 ++++----- src/fs/coss/store_io_coss.cc | 2 +- src/fs/ufs/store_io_ufs.cc | 6 +- src/gopher.cc | 4 +- src/helper.cc | 32 +++++----- src/http.cc | 8 +-- src/icmp/Icmp4.cc | 4 +- src/icmp/Icmp6.cc | 4 +- src/icmp/IcmpPinger.cc | 6 +- src/icmp/IcmpSquid.cc | 12 ++-- src/icmp/net_db.cc | 12 ++-- src/icp_v2.cc | 4 +- src/ip/Address.cc | 2 +- src/ipc.cc | 4 +- src/ipc/Coordinator.cc | 2 +- src/ipc/FdNotes.cc | 2 +- src/ipc/Strand.cc | 2 +- src/ipc_win32.cc | 4 +- src/ipcache.cc | 24 +++---- src/log/File.cc | 8 +-- src/log/ModDaemon.cc | 6 +- src/log/ModSyslog.cc | 2 +- src/log/ModTcp.cc | 4 +- src/log/ModUdp.cc | 4 +- src/log/access_log.cc | 2 +- src/main.cc | 26 ++++---- src/mem.cc | 10 +-- src/mime.cc | 18 +++--- src/multicast.cc | 2 +- src/neighbors.cc | 24 +++---- src/peer_digest.cc | 8 +-- src/peer_select.cc | 4 +- src/repl/heap/store_repl_heap.cc | 2 +- src/send-announce.cc | 8 +-- src/snmp_core.cc | 2 +- src/ssl/helper.cc | 2 +- src/ssl/support.cc | 12 ++-- src/stat.cc | 4 +- src/stmem.cc | 8 +-- src/store.cc | 18 +++--- src/store_client.cc | 6 +- src/store_digest.cc | 6 +- src/store_dir.cc | 38 ++++++------ src/store_log.cc | 4 +- src/store_rebuild.cc | 32 +++++----- src/store_swapin.cc | 4 +- src/tools.cc | 4 +- src/unlinkd.cc | 12 ++-- src/url.cc | 6 +- src/urn.cc | 4 +- src/wccp.cc | 6 +- src/wccp2.cc | 52 ++++++++-------- test-suite/debug.cc | 6 +- 108 files changed, 506 insertions(+), 506 deletions(-) diff --git a/src/DiskIO/AIO/AIODiskFile.cc b/src/DiskIO/AIO/AIODiskFile.cc index 33abf93dd9..047447ac50 100644 --- a/src/DiskIO/AIO/AIODiskFile.cc +++ b/src/DiskIO/AIO/AIODiskFile.cc @@ -127,7 +127,7 @@ AIODiskFile::read(ReadRequest *request) if (slot < 0) { /* No free slot? Callback error, and return */ fatal("Aiee! out of aiocb slots! - FIXME and wrap file_read\n"); - debugs(79, 1, "WARNING: out of aiocb slots!"); + debugs(79, DBG_IMPORTANT, "WARNING: out of aiocb slots!"); /* fall back to blocking method */ // file_read(fd, request->buf, request->len, request->offset, callback, data); return; @@ -164,7 +164,7 @@ AIODiskFile::read(ReadRequest *request) /* Initiate aio */ if (aio_read(&qe->aq_e_aiocb) < 0) { fatalf("Aiee! aio_read() returned error (%d) FIXME and wrap file_read !\n", errno); - debugs(79, 1, "WARNING: aio_read() returned error: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "WARNING: aio_read() returned error: " << xstrerror()); /* fall back to blocking method */ // file_read(fd, request->buf, request->len, request->offset, callback, data); } @@ -185,7 +185,7 @@ AIODiskFile::write(WriteRequest *request) if (slot < 0) { /* No free slot? Callback error, and return */ fatal("Aiee! out of aiocb slots FIXME and wrap file_write !\n"); - debugs(79, 1, "WARNING: out of aiocb slots!"); + debugs(79, DBG_IMPORTANT, "WARNING: out of aiocb slots!"); /* fall back to blocking method */ // file_write(fd, offset, buf, len, callback, data, freefunc); return; @@ -222,7 +222,7 @@ AIODiskFile::write(WriteRequest *request) /* Initiate aio */ if (aio_write(&qe->aq_e_aiocb) < 0) { fatalf("Aiee! aio_write() returned error (%d) FIXME and wrap file_write !\n", errno); - debugs(79, 1, "WARNING: aio_write() returned error: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "WARNING: aio_write() returned error: " << xstrerror()); /* fall back to blocking method */ // file_write(fd, offset, buf, len, callback, data, freefunc); } diff --git a/src/DiskIO/AIO/aio_win32.cc b/src/DiskIO/AIO/aio_win32.cc index 728508dc0c..d047691964 100644 --- a/src/DiskIO/AIO/aio_win32.cc +++ b/src/DiskIO/AIO/aio_win32.cc @@ -100,7 +100,7 @@ int aio_read(struct aiocb *aiocbp) /* Test to see if the I/O was queued successfully. */ if (!IoOperationStatus) { errno = GetLastError(); - debugs(81,1, "aio_read: GetLastError=" << errno ); + debugs(81, DBG_IMPORTANT, "aio_read: GetLastError=" << errno ); return -1; } @@ -152,7 +152,7 @@ int aio_read64(struct aiocb64 *aiocbp) /* Test to see if the I/O was queued successfully. */ if (!IoOperationStatus) { errno = GetLastError(); - debugs(81, 1, "aio_read: GetLastError=" << errno ); + debugs(81, DBG_IMPORTANT, "aio_read: GetLastError=" << errno ); return -1; } @@ -212,7 +212,7 @@ int aio_write(struct aiocb *aiocbp) /* Test to see if the I/O was queued successfully. */ if (!IoOperationStatus) { errno = GetLastError(); - debugs(81, 1, "aio_write: GetLastError=" << errno ); + debugs(81, DBG_IMPORTANT, "aio_write: GetLastError=" << errno ); return -1; } @@ -264,7 +264,7 @@ int aio_write64(struct aiocb64 *aiocbp) /* Test to see if the I/O was queued successfully. */ if (!IoOperationStatus) { errno = GetLastError(); - debugs(81, 1, "aio_write: GetLastError=" << errno ); + debugs(81, DBG_IMPORTANT, "aio_write: GetLastError=" << errno ); return -1; } diff --git a/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc b/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc index 8d1cecdac8..c906610a0b 100644 --- a/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc +++ b/src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc @@ -67,7 +67,7 @@ DiskDaemonDiskIOModule::init() * the debug log is configured and we'll get the message on * stderr when doing things like 'squid -k reconfigure' */ - debugs(47, 1, "diskd started"); + debugs(47, DBG_IMPORTANT, "diskd started"); #endif initialised = true; diff --git a/src/DiskIO/DiskDaemon/DiskdFile.cc b/src/DiskIO/DiskDaemon/DiskdFile.cc index 5946c8d0ab..7523ca1e84 100644 --- a/src/DiskIO/DiskDaemon/DiskdFile.cc +++ b/src/DiskIO/DiskDaemon/DiskdFile.cc @@ -140,7 +140,7 @@ DiskdFile::create(int flags, mode_t aMode, RefCount< IORequestor > callback) ioCompleted(); errorOccured = true; // IO->shm.put (shm_offset); - debugs(79, 1, "storeDiskdSend CREATE: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "storeDiskdSend CREATE: " << xstrerror()); notifyClient(); ioRequestor = NULL; return; @@ -169,7 +169,7 @@ DiskdFile::read(ReadRequest *aRead) ioCompleted(); errorOccured = true; // IO->shm.put (shm_offset); - debugs(79, 1, "storeDiskdSend READ: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "storeDiskdSend READ: " << xstrerror()); notifyClient(); ioRequestor = NULL; return; @@ -195,7 +195,7 @@ DiskdFile::close() if (x < 0) { ioCompleted(); errorOccured = true; - debugs(79, 1, "storeDiskdSend CLOSE: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "storeDiskdSend CLOSE: " << xstrerror()); notifyClient(); ioRequestor = NULL; return; @@ -332,7 +332,7 @@ DiskdFile::write(WriteRequest *aRequest) if (x < 0) { ioCompleted(); errorOccured = true; - debugs(79, 1, "storeDiskdSend WRITE: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "storeDiskdSend WRITE: " << xstrerror()); // IO->shm.put (shm_offset); notifyClient(); ioRequestor = NULL; diff --git a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc index 1168bfea9e..018bf69d38 100644 --- a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc +++ b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc @@ -146,7 +146,7 @@ DiskdIOStrategy::unlinkFile(char const *path) shm_offset); if (x < 0) { - debugs(79, 1, "storeDiskdSend UNLINK: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "storeDiskdSend UNLINK: " << xstrerror()); ::unlink(buf); /* XXX EWW! */ // shm.put (shm_offset); } @@ -393,7 +393,7 @@ DiskdIOStrategy::SEND(diomsg *M, int mtype, int id, size_t size, off_t offset, s M->seq_no = ++seq_no; if (M->seq_no < last_seq_no) - debugs(79, 1, "WARNING: sequencing out of order"); + debugs(79, DBG_IMPORTANT, "WARNING: sequencing out of order"); x = msgsnd(smsgid, M, diomsg::msg_snd_rcv_sz, IPC_NOWAIT); @@ -403,7 +403,7 @@ DiskdIOStrategy::SEND(diomsg *M, int mtype, int id, size_t size, off_t offset, s ++diskd_stats.sent_count; ++away; } else { - debugs(79, 1, "storeDiskdSend: msgsnd: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "storeDiskdSend: msgsnd: " << xstrerror()); cbdataReferenceDone(M->callback_data); assert(++send_errors < 100); if (shm_offset > -1) @@ -466,13 +466,13 @@ DiskdIOStrategy::optionQ1Parse(const char *name, const char *value, int isaRecon * will cause an assertion in storeDiskdShmGet(). */ /* TODO: have DiskdIO hold a link to the swapdir, to allow detailed reporting again */ - debugs(3, 1, "WARNING: cannot increase cache_dir Q1 value while Squid is running."); + debugs(3, DBG_IMPORTANT, "WARNING: cannot increase cache_dir Q1 value while Squid is running."); magic1 = old_magic1; return true; } if (old_magic1 != magic1) - debugs(3, 1, "cache_dir new Q1 value '" << magic1 << "'"); + debugs(3, DBG_IMPORTANT, "cache_dir new Q1 value '" << magic1 << "'"); return true; } @@ -498,13 +498,13 @@ DiskdIOStrategy::optionQ2Parse(const char *name, const char *value, int isaRecon if (old_magic2 < magic2) { /* See comments in Q1 function above */ - debugs(3, 1, "WARNING: cannot increase cache_dir Q2 value while Squid is running."); + debugs(3, DBG_IMPORTANT, "WARNING: cannot increase cache_dir Q2 value while Squid is running."); magic2 = old_magic2; return true; } if (old_magic2 != magic2) - debugs(3, 1, "cache_dir new Q2 value '" << magic2 << "'"); + debugs(3, DBG_IMPORTANT, "cache_dir new Q2 value '" << magic2 << "'"); return true; } @@ -526,7 +526,7 @@ DiskdIOStrategy::sync() while (away > 0) { if (squid_curtime > lastmsg) { - debugs(47, 1, "storeDiskdDirSync: " << away << " messages away"); + debugs(47, DBG_IMPORTANT, "storeDiskdDirSync: " << away << " messages away"); lastmsg = squid_curtime; } @@ -570,7 +570,7 @@ DiskdIOStrategy::callback() if (x < 0) break; else if (x != diomsg::msg_snd_rcv_sz) { - debugs(47, 1, "storeDiskdDirCallback: msgget returns " << x); + debugs(47, DBG_IMPORTANT, "storeDiskdDirCallback: msgget returns " << x); break; } diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index 19f220b44c..7899a0b401 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -186,7 +186,7 @@ DiskThreadsDiskFile::openDone(int unused, const char *unused2, int anFD, int err if (errflag || fd < 0) { errno = errflag; debugs(79, 0, "DiskThreadsDiskFile::openDone: " << xstrerror()); - debugs(79, 1, "\t" << path_); + debugs(79, DBG_IMPORTANT, "\t" << path_); errorOccured = true; } else { ++store_open_disk_fd; diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc index 926dc76725..b7658685fb 100644 --- a/src/DiskIO/DiskThreads/aiops.cc +++ b/src/DiskIO/DiskThreads/aiops.cc @@ -527,7 +527,7 @@ squidaio_queue_request(squidaio_request_t * request) if (++filter >= filter_limit) { filter_limit += filter; filter = 0; - debugs(43, 1, "squidaio_queue_request: WARNING - Queue congestion"); + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Queue congestion"); } } @@ -550,10 +550,10 @@ squidaio_queue_request(squidaio_request_t * request) if (squid_curtime >= (last_warn + 15) && squid_curtime >= (high_start + 5)) { - debugs(43, 1, "squidaio_queue_request: WARNING - Disk I/O overloading"); + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Disk I/O overloading"); if (squid_curtime >= (high_start + 15)) - debugs(43, 1, "squidaio_queue_request: Queue Length: current=" << + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: Queue Length: current=" << request_queue_len << ", high=" << queue_high << ", low=" << queue_low << ", duration=" << (long int) (squid_curtime - high_start)); diff --git a/src/DiskIO/DiskThreads/aiops_win32.cc b/src/DiskIO/DiskThreads/aiops_win32.cc index 3b54357adc..9988f977ea 100644 --- a/src/DiskIO/DiskThreads/aiops_win32.cc +++ b/src/DiskIO/DiskThreads/aiops_win32.cc @@ -612,7 +612,7 @@ squidaio_queue_request(squidaio_request_t * request) if (++filter >= filter_limit) { filter_limit += filter; filter = 0; - debugs(43, 1, "squidaio_queue_request: WARNING - Queue congestion"); + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Queue congestion"); } } @@ -635,10 +635,10 @@ squidaio_queue_request(squidaio_request_t * request) if (squid_curtime >= (last_warn + 15) && squid_curtime >= (high_start + 5)) { - debugs(43, 1, "squidaio_queue_request: WARNING - Disk I/O overloading"); + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Disk I/O overloading"); if (squid_curtime >= (high_start + 15)) - debugs(43, 1, "squidaio_queue_request: Queue Length: current=" << + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: Queue Length: current=" << request_queue_len << ", high=" << queue_high << ", low=" << queue_low << ", duration=" << (long int) (squid_curtime - high_start)); diff --git a/src/DiskIO/DiskThreads/async_io.cc b/src/DiskIO/DiskThreads/async_io.cc index c8b3c65bf2..53200fbaef 100644 --- a/src/DiskIO/DiskThreads/async_io.cc +++ b/src/DiskIO/DiskThreads/async_io.cc @@ -110,7 +110,7 @@ aioCancel(int fd) AIOCB *callback = ctrlp->done_handler; void *cbdata; ctrlp->done_handler = NULL; - debugs(32, 1, "this be aioCancel. Danger ahead!"); + debugs(32, DBG_IMPORTANT, "this be aioCancel. Danger ahead!"); if (cbdataReferenceValidDone(ctrlp->done_handler_data, &cbdata)) callback(fd, cbdata, NULL, -2, -2); diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index b27a5d088d..6fcb791c50 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -135,7 +135,7 @@ IpcIoFile::openCompleted(const Ipc::StrandSearchResponse *const response) Must(diskId < 0); // we do not know our disker yet if (!response) { - debugs(79,1, HERE << "error: timeout"); + debugs(79, DBG_IMPORTANT, HERE << "error: timeout"); error_ = true; } else { diskId = response->strand.kidId; @@ -145,7 +145,7 @@ IpcIoFile::openCompleted(const Ipc::StrandSearchResponse *const response) Must(inserted); } else { error_ = true; - debugs(79,1, HERE << "error: no disker claimed " << dbName); + debugs(79, DBG_IMPORTANT, HERE << "error: no disker claimed " << dbName); } } @@ -222,10 +222,10 @@ IpcIoFile::readCompleted(ReadRequest *readRequest, ioError = true; // I/O timeout does not warrant setting error_? } else { if (response->xerrno) { - debugs(79,1, HERE << "error: " << xstrerr(response->xerrno)); + debugs(79, DBG_IMPORTANT, HERE << "error: " << xstrerr(response->xerrno)); ioError = error_ = true; } else if (!response->page) { - debugs(79,1, HERE << "error: run out of shared memory pages"); + debugs(79, DBG_IMPORTANT, HERE << "error: run out of shared memory pages"); ioError = true; } else { const char *const buf = Ipc::Mem::PagePointer(response->page); @@ -268,10 +268,10 @@ IpcIoFile::writeCompleted(WriteRequest *writeRequest, debugs(79, 3, HERE << "error: timeout"); ioError = true; // I/O timeout does not warrant setting error_? } else if (response->xerrno) { - debugs(79,1, HERE << "error: " << xstrerr(response->xerrno)); + debugs(79, DBG_IMPORTANT, HERE << "error: " << xstrerr(response->xerrno)); ioError = error_ = true; } else if (response->len != writeRequest->len) { - debugs(79,1, HERE << "problem: " << response->len << " < " << writeRequest->len); + debugs(79, DBG_IMPORTANT, HERE << "problem: " << response->len << " < " << writeRequest->len); error_ = true; } diff --git a/src/DiskIO/Mmapped/MmappedFile.cc b/src/DiskIO/Mmapped/MmappedFile.cc index 2501d73e9e..b10174e03a 100644 --- a/src/DiskIO/Mmapped/MmappedFile.cc +++ b/src/DiskIO/Mmapped/MmappedFile.cc @@ -187,10 +187,10 @@ MmappedFile::write(WriteRequest *aRequest) const ssize_t written = pwrite(fd, aRequest->buf, aRequest->len, aRequest->offset); if (written < 0) { - debugs(79,1, HERE << "error: " << xstrerr(errno)); + debugs(79, DBG_IMPORTANT, HERE << "error: " << xstrerr(errno)); error_ = true; } else if (static_cast(written) != aRequest->len) { - debugs(79,1, HERE << "problem: " << written << " < " << aRequest->len); + debugs(79, DBG_IMPORTANT, HERE << "problem: " << written << " < " << aRequest->len); error_ = true; } diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 4e8a8228e5..024c7b0ab1 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -548,7 +548,7 @@ HttpHeader::parse(const char *header_start, const char *header_end) char *nulpos; if ((nulpos = (char*)memchr(header_start, '\0', header_end - header_start))) { - debugs(55, 1, "WARNING: HTTP header contains NULL characters {" << + debugs(55, DBG_IMPORTANT, "WARNING: HTTP header contains NULL characters {" << getStringPrefix(header_start, nulpos) << "}\nNULL\n{" << getStringPrefix(nulpos+1, header_end)); goto reset; } @@ -580,7 +580,7 @@ HttpHeader::parse(const char *header_start, const char *header_end) cr_only = false; } if (cr_only) { - debugs(55, 1, "WARNING: Rejecting HTTP request with a CR+ " + debugs(55, DBG_IMPORTANT, "WARNING: Rejecting HTTP request with a CR+ " "header field to prevent request smuggling attacks: {" << getStringPrefix(header_start, header_end) << "}"); goto reset; @@ -590,7 +590,7 @@ HttpHeader::parse(const char *header_start, const char *header_end) /* Barf on stray CR characters */ if (memchr(this_line, '\r', field_end - this_line)) { - debugs(55, 1, "WARNING: suspicious CR characters in HTTP header {" << + debugs(55, DBG_IMPORTANT, "WARNING: suspicious CR characters in HTTP header {" << getStringPrefix(field_start, field_end) << "}"); if (Config.onoff.relaxed_header_parser) { @@ -605,7 +605,7 @@ HttpHeader::parse(const char *header_start, const char *header_end) } if (this_line + 1 == field_end && this_line > field_start) { - debugs(55, 1, "WARNING: Blank continuation line in HTTP header {" << + debugs(55, DBG_IMPORTANT, "WARNING: Blank continuation line in HTTP header {" << getStringPrefix(header_start, header_end) << "}"); goto reset; } @@ -613,7 +613,7 @@ HttpHeader::parse(const char *header_start, const char *header_end) if (field_start == field_end) { if (field_ptr < header_end) { - debugs(55, 1, "WARNING: unparseable HTTP header field near {" << + debugs(55, DBG_IMPORTANT, "WARNING: unparseable HTTP header field near {" << getStringPrefix(field_start, header_end) << "}"); goto reset; } @@ -622,7 +622,7 @@ HttpHeader::parse(const char *header_start, const char *header_end) } if ((e = HttpHeaderEntry::parse(field_start, field_end)) == NULL) { - debugs(55, 1, "WARNING: unparseable HTTP header field {" << + debugs(55, DBG_IMPORTANT, "WARNING: unparseable HTTP header field {" << getStringPrefix(field_start, field_end) << "}"); debugs(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2, " in {" << getStringPrefix(header_start, header_end) << "}"); @@ -646,11 +646,11 @@ HttpHeader::parse(const char *header_start, const char *header_end) } if (!httpHeaderParseOffset(e->value.termedBuf(), &l1)) { - debugs(55, 1, "WARNING: Unparseable content-length '" << e->value << "'"); + debugs(55, DBG_IMPORTANT, "WARNING: Unparseable content-length '" << e->value << "'"); delete e; continue; } else if (!httpHeaderParseOffset(e2->value.termedBuf(), &l2)) { - debugs(55, 1, "WARNING: Unparseable content-length '" << e2->value << "'"); + debugs(55, DBG_IMPORTANT, "WARNING: Unparseable content-length '" << e2->value << "'"); delById(e2->id); } else if (l1 > l2) { delById(e2->id); @@ -1544,7 +1544,7 @@ HttpHeaderEntry::parse(const char *field_start, const char *field_end) if (name_len > 65534) { /* String must be LESS THAN 64K and it adds a terminating NULL */ - debugs(55, 1, "WARNING: ignoring header name of " << name_len << " bytes"); + debugs(55, DBG_IMPORTANT, "WARNING: ignoring header name of " << name_len << " bytes"); return NULL; } @@ -1590,7 +1590,7 @@ HttpHeaderEntry::parse(const char *field_start, const char *field_end) if (field_end - value_start > 65534) { /* String must be LESS THAN 64K and it adds a terminating NULL */ - debugs(55, 1, "WARNING: ignoring '" << name << "' header of " << (field_end - value_start) << " bytes"); + debugs(55, DBG_IMPORTANT, "WARNING: ignoring '" << name << "' header of " << (field_end - value_start) << " bytes"); if (id == HDR_OTHER) name.clean(); diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index b008db9e0e..bbe4536660 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -164,7 +164,7 @@ bool HttpMsg::parse(MemBuf *buf, bool eof, http_status *error) // TODO: move to httpReplyParseStep() if (hdr_len > Config.maxReplyHeaderSize || (hdr_len <= 0 && (size_t)buf->contentSize() > Config.maxReplyHeaderSize)) { - debugs(58, 1, "HttpMsg::parse: Too large reply header (" << hdr_len << " > " << Config.maxReplyHeaderSize); + debugs(58, DBG_IMPORTANT, "HttpMsg::parse: Too large reply header (" << hdr_len << " > " << Config.maxReplyHeaderSize); *error = HTTP_HEADER_TOO_LARGE; return false; } @@ -196,7 +196,7 @@ bool HttpMsg::parse(MemBuf *buf, bool eof, http_status *error) debugs(58, 9, "HttpMsg::parse success (" << hdr_len << " bytes) near '" << buf->content() << "'"); if (hdr_sz != (int)hdr_len) { - debugs(58, 1, "internal HttpMsg::parse vs. headersEnd error: " << + debugs(58, DBG_IMPORTANT, "internal HttpMsg::parse vs. headersEnd error: " << hdr_sz << " != " << hdr_len); hdr_sz = (int)hdr_len; // because old http.cc code used hdr_len } diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 541ccf5cd8..ec8c424419 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -319,7 +319,7 @@ HttpRequest::parseFirstLine(const char *start, const char *end) ++end; // back to space if (2 != sscanf(ver + 5, "%d.%d", &http_ver.major, &http_ver.minor)) { - debugs(73, 1, "parseRequestLine: Invalid HTTP identifier."); + debugs(73, DBG_IMPORTANT, "parseRequestLine: Invalid HTTP identifier."); return false; } } else { diff --git a/src/HttpRequestMethod.cc b/src/HttpRequestMethod.cc index 4ff3bd1317..0e96e853af 100644 --- a/src/HttpRequestMethod.cc +++ b/src/HttpRequestMethod.cc @@ -142,12 +142,12 @@ HttpRequestMethod::AddExtension(const char *mstr) /* Don't free statically allocated "%EXTnn" string */ RequestMethodStr[method] = xstrdup(mstr); - debugs(23, 1, "Extension method '" << mstr << "' added, enum=" << method); + debugs(23, DBG_IMPORTANT, "Extension method '" << mstr << "' added, enum=" << method); return; } - debugs(23, 1, "WARNING: Could not add new extension method '" << mstr << "' due to lack of array space"); + debugs(23, DBG_IMPORTANT, "WARNING: Could not add new extension method '" << mstr << "' due to lack of array space"); #endif } diff --git a/src/LeakFinder.cc b/src/LeakFinder.cc index 4c49e27c41..9cebf7e2c3 100644 --- a/src/LeakFinder.cc +++ b/src/LeakFinder.cc @@ -128,14 +128,14 @@ LeakFinder::dump() last_dump = squid_curtime; - debugs(45, 1, "Tracking " << count << " pointers"); + debugs(45, DBG_IMPORTANT, "Tracking " << count << " pointers"); hash_first(table); LeakFinderPtr *c; while ((c = (LeakFinderPtr *)hash_next(table))) { - debugs(45, 1, std::setw(20) << c->key << " last used " << std::setw(9) << (squid_curtime - c->when) << + debugs(45, DBG_IMPORTANT, std::setw(20) << c->key << " last used " << std::setw(9) << (squid_curtime - c->when) << " seconds ago by " << c->file << ":" << c->line); } } diff --git a/src/LoadableModules.cc b/src/LoadableModules.cc index 5dbb8f1bdf..fa59830064 100644 --- a/src/LoadableModules.cc +++ b/src/LoadableModules.cc @@ -6,7 +6,7 @@ static void LoadModule(const char *fname) { - debugs(1, 1, "Loading Squid module from '" << fname << "'"); + debugs(1, DBG_IMPORTANT, "Loading Squid module from '" << fname << "'"); LoadableModule *m = new LoadableModule(fname); m->load(); @@ -21,5 +21,5 @@ LoadableModulesConfigure(const wordlist *names) int count = 0; for (const wordlist *i = names; i; i = i->next, ++count) LoadModule(i->key); - debugs(1, 1, "Squid plugin modules loaded: " << count); + debugs(1, DBG_IMPORTANT, "Squid plugin modules loaded: " << count); } diff --git a/src/MemObject.cc b/src/MemObject.cc index 7a2de16e6a..ad2c6208e3 100644 --- a/src/MemObject.cc +++ b/src/MemObject.cc @@ -171,16 +171,16 @@ MemObject::dump() const data_hdr.dump(); #if 0 /* do we want this one? */ - debugs(20, 1, "MemObject->data.origin_offset: " << (data_hdr.head ? data_hdr.head->nodeBuffer.offset : 0)); + debugs(20, DBG_IMPORTANT, "MemObject->data.origin_offset: " << (data_hdr.head ? data_hdr.head->nodeBuffer.offset : 0)); #endif - debugs(20, 1, "MemObject->start_ping: " << start_ping.tv_sec << "."<< std::setfill('0') << std::setw(6) << start_ping.tv_usec); - debugs(20, 1, "MemObject->inmem_hi: " << data_hdr.endOffset()); - debugs(20, 1, "MemObject->inmem_lo: " << inmem_lo); - debugs(20, 1, "MemObject->nclients: " << nclients); - debugs(20, 1, "MemObject->reply: " << _reply); - debugs(20, 1, "MemObject->request: " << request); - debugs(20, 1, "MemObject->log_url: " << log_url << " " << checkNullString(log_url)); + debugs(20, DBG_IMPORTANT, "MemObject->start_ping: " << start_ping.tv_sec << "."<< std::setfill('0') << std::setw(6) << start_ping.tv_usec); + debugs(20, DBG_IMPORTANT, "MemObject->inmem_hi: " << data_hdr.endOffset()); + debugs(20, DBG_IMPORTANT, "MemObject->inmem_lo: " << inmem_lo); + debugs(20, DBG_IMPORTANT, "MemObject->nclients: " << nclients); + debugs(20, DBG_IMPORTANT, "MemObject->reply: " << _reply); + debugs(20, DBG_IMPORTANT, "MemObject->request: " << request); + debugs(20, DBG_IMPORTANT, "MemObject->log_url: " << log_url << " " << checkNullString(log_url)); } HttpReply const * diff --git a/src/Server.cc b/src/Server.cc index 51739abd72..be6c3d61de 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -379,7 +379,7 @@ ServerStateData::sentRequestBody(const CommIoCbParams &io) } if (io.flag) { - debugs(11, 1, "sentRequestBody error: FD " << io.fd << ": " << xstrerr(io.xerrno)); + debugs(11, DBG_IMPORTANT, "sentRequestBody error: FD " << io.fd << ": " << xstrerr(io.xerrno)); ErrorState *err; err = new ErrorState(ERR_WRITE_ERROR, HTTP_BAD_GATEWAY, fwd->request); err->xerrno = io.xerrno; diff --git a/src/StoreMeta.cc b/src/StoreMeta.cc index bda8156207..beac7c9386 100644 --- a/src/StoreMeta.cc +++ b/src/StoreMeta.cc @@ -205,7 +205,7 @@ StoreMeta::checkConsistency(StoreEntry *e) const break; default: - debugs(20, 1, "WARNING: got unused STORE_META type " << getType()); + debugs(20, DBG_IMPORTANT, "WARNING: got unused STORE_META type " << getType()); break; } diff --git a/src/StoreMetaMD5.cc b/src/StoreMetaMD5.cc index 2325f1e9cf..81a869e3cb 100644 --- a/src/StoreMetaMD5.cc +++ b/src/StoreMetaMD5.cc @@ -59,7 +59,7 @@ StoreMetaMD5::checkConsistency(StoreEntry *e) const debugs(20, 2, "\t" << e->getMD5Text()); if (isPowTen(++md5_mismatches)) - debugs(20, 1, "WARNING: " << md5_mismatches << " swapin MD5 mismatches"); + debugs(20, DBG_IMPORTANT, "WARNING: " << md5_mismatches << " swapin MD5 mismatches"); return false; } diff --git a/src/StoreMetaURL.cc b/src/StoreMetaURL.cc index 67278a3631..9dba63a917 100644 --- a/src/StoreMetaURL.cc +++ b/src/StoreMetaURL.cc @@ -47,8 +47,8 @@ StoreMetaURL::checkConsistency(StoreEntry *e) const return true; if (strcasecmp(e->mem_obj->url, (char *)value)) { - debugs(20, 1, "storeClientReadHeader: URL mismatch"); - debugs(20, 1, "\t{" << (char *) value << "} != {" << e->mem_obj->url << "}"); + debugs(20, DBG_IMPORTANT, "storeClientReadHeader: URL mismatch"); + debugs(20, DBG_IMPORTANT, "\t{" << (char *) value << "} != {" << e->mem_obj->url << "}"); return false; } diff --git a/src/SwapDir.cc b/src/SwapDir.cc index 0e20ae5964..36272e9c0e 100644 --- a/src/SwapDir.cc +++ b/src/SwapDir.cc @@ -266,7 +266,7 @@ SwapDir::parseOptions(int isaReconfig) if (isaReconfig) { if (old_read_only != flags.read_only) { - debugs(3, 1, "Cache dir '" << path << "' now " << (flags.read_only ? "No-Store" : "Read-Write")); + debugs(3, DBG_IMPORTANT, "Cache dir '" << path << "' now " << (flags.read_only ? "No-Store" : "Read-Write")); } } } diff --git a/src/WinSvc.cc b/src/WinSvc.cc index cfe0c4c6c2..aebf145e9f 100644 --- a/src/WinSvc.cc +++ b/src/WinSvc.cc @@ -457,10 +457,10 @@ WIN32_IpAddrChangeMonitor(LPVOID lpParam) while (1) { Result = NotifyAddrChange(NULL, NULL); if (Result != NO_ERROR) { - debugs(1, 1, "NotifyAddrChange error " << Result); + debugs(1, DBG_IMPORTANT, "NotifyAddrChange error " << Result); return 1; } - debugs(1, 1, "Notification of IP address change received, requesting Squid reconfiguration ..."); + debugs(1, DBG_IMPORTANT, "Notification of IP address change received, requesting Squid reconfiguration ..."); reconfigure(SIGHUP); } return 0; @@ -478,7 +478,7 @@ WIN32_IpAddrChangeMonitorInit() if (NotifyAddrChange_thread == NULL) { status = GetLastError(); NotifyAddrChange_thread = INVALID_HANDLE_VALUE; - debugs(1, 1, "Failed to start IP monitor thread."); + debugs(1, DBG_IMPORTANT, "Failed to start IP monitor thread."); } else debugs(1, 2, "Starting IP monitor thread [" << threadID << "] ..."); } @@ -628,10 +628,10 @@ WIN32_svcHandler(DWORD Opcode) if (!SetServiceStatus(svcHandle, &svcStatus)) { status = GetLastError(); - debugs(1, 1, "SetServiceStatus error " << status); + debugs(1, DBG_IMPORTANT, "SetServiceStatus error " << status); } - debugs(1, 1, "Leaving Squid service"); + debugs(1, DBG_IMPORTANT, "Leaving Squid service"); return; case _WIN_SQUID_SERVICE_CONTROL_INTERROGATE: @@ -639,7 +639,7 @@ WIN32_svcHandler(DWORD Opcode) if (!SetServiceStatus(svcHandle, &svcStatus)) { status = GetLastError(); - debugs(1, 1, "SetServiceStatus error " << status); + debugs(1, DBG_IMPORTANT, "SetServiceStatus error " << status); } break; @@ -666,14 +666,14 @@ WIN32_svcHandler(DWORD Opcode) if (!SetServiceStatus(svcHandle, &svcStatus)) { status = GetLastError(); - debugs(1, 1, "SetServiceStatus error " << status); + debugs(1, DBG_IMPORTANT, "SetServiceStatus error " << status); } - debugs(1, 1, "Leaving Squid service"); + debugs(1, DBG_IMPORTANT, "Leaving Squid service"); break; default: - debugs(1, 1, "Unrecognized opcode " << Opcode); + debugs(1, DBG_IMPORTANT, "Unrecognized opcode " << Opcode); } return; diff --git a/src/acl/Acl.cc b/src/acl/Acl.cc index 36d7db7d88..b77b0e33f3 100644 --- a/src/acl/Acl.cc +++ b/src/acl/Acl.cc @@ -303,12 +303,12 @@ ACL::checklistMatches(ACLChecklist *checklist) int rv; if (!checklist->hasRequest() && requiresRequest()) { - debugs(28, 1, "ACL::checklistMatches WARNING: '" << name << "' ACL is used but there is no HTTP request -- not matching."); + debugs(28, DBG_IMPORTANT, "ACL::checklistMatches WARNING: '" << name << "' ACL is used but there is no HTTP request -- not matching."); return 0; } if (!checklist->hasReply() && requiresReply()) { - debugs(28, 1, "ACL::checklistMatches WARNING: '" << name << "' ACL is used but there is no HTTP reply -- not matching."); + debugs(28, DBG_IMPORTANT, "ACL::checklistMatches WARNING: '" << name << "' ACL is used but there is no HTTP reply -- not matching."); return 0; } diff --git a/src/acl/Asn.cc b/src/acl/Asn.cc index b584eb57ba..fb46a5a897 100644 --- a/src/acl/Asn.cc +++ b/src/acl/Asn.cc @@ -295,11 +295,11 @@ asHandleReply(void *data, StoreIOBuffer result) asStateFree(asState); return; } else if (result.flags.error) { - debugs(53, 1, "asHandleReply: Called with Error set and size=" << (unsigned int) result.length); + debugs(53, DBG_IMPORTANT, "asHandleReply: Called with Error set and size=" << (unsigned int) result.length); asStateFree(asState); return; } else if (HTTP_OK != e->getReply()->sline.status) { - debugs(53, 1, "WARNING: AS " << asState->as_number << " whois request failed"); + debugs(53, DBG_IMPORTANT, "WARNING: AS " << asState->as_number << " whois request failed"); asStateFree(asState); return; } diff --git a/src/adaptation/Config.cc b/src/adaptation/Config.cc index e19e81a67a..2d749775c7 100644 --- a/src/adaptation/Config.cc +++ b/src/adaptation/Config.cc @@ -253,7 +253,7 @@ void Adaptation::Config::Finalize(bool enabled) { Enabled = enabled; - debugs(93,1, "Adaptation support is " << (Enabled ? "on" : "off.")); + debugs(93, DBG_IMPORTANT, "Adaptation support is " << (Enabled ? "on" : "off.")); FinalizeEach(AllServices(), "message adaptation services"); FinalizeEach(AllGroups(), "message adaptation service groups"); diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index 2f20f83e80..65db515a3d 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -264,7 +264,7 @@ Adaptation::Ecap::CheckUnusedAdapterServices(const Adaptation::Services& cfgs) found = (*cfged)->cfg().uri == (*loaded)->uri().c_str(); } if (!found) - debugs(93, 1, "Warning: loaded eCAP service has no matching " << + debugs(93, DBG_IMPORTANT, "Warning: loaded eCAP service has no matching " << "ecap_service config option: " << (*loaded)->uri()); } } diff --git a/src/adaptation/icap/History.cc b/src/adaptation/icap/History.cc index 4e1d5affae..8cfc856ca7 100644 --- a/src/adaptation/icap/History.cc +++ b/src/adaptation/icap/History.cc @@ -21,7 +21,7 @@ void Adaptation::Icap::History::start(const char *context) void Adaptation::Icap::History::stop(const char *context) { if (!concurrencyLevel) { - debugs(93,1, HERE << "Internal error: poor history accounting " << this); + debugs(93, DBG_IMPORTANT, HERE << "Internal error: poor history accounting " << this); return; } diff --git a/src/adaptation/icap/ServiceRep.cc b/src/adaptation/icap/ServiceRep.cc index 79afc6b16e..37d3fe7c73 100644 --- a/src/adaptation/icap/ServiceRep.cc +++ b/src/adaptation/icap/ServiceRep.cc @@ -254,7 +254,7 @@ void Adaptation::Icap::ServiceRep::suspend(const char *reason) debugs(93,4, HERE << "keeping suspended, also for " << reason); } else { isSuspended = reason; - debugs(93,1, "suspending ICAP service for " << reason); + debugs(93, DBG_IMPORTANT, "suspending ICAP service for " << reason); scheduleUpdate(squid_curtime + TheConfig.service_revival_delay); announceStatusChange("suspended", true); } @@ -455,7 +455,7 @@ void Adaptation::Icap::ServiceRep::checkOptions() return; if (!theOptions->valid()) { - debugs(93,1, "WARNING: Squid got an invalid ICAP OPTIONS response " << + debugs(93, DBG_IMPORTANT, "WARNING: Squid got an invalid ICAP OPTIONS response " << "from service " << cfg().uri << "; error: " << theOptions->error); return; } @@ -483,7 +483,7 @@ void Adaptation::Icap::ServiceRep::checkOptions() } if (!method_found) { - debugs(93,1, "WARNING: Squid is configured to use ICAP method " << + debugs(93, DBG_IMPORTANT, "WARNING: Squid is configured to use ICAP method " << cfg().methodStr() << " for service " << cfg().uri << " but OPTIONS response declares the methods are " << method_list); @@ -498,7 +498,7 @@ void Adaptation::Icap::ServiceRep::checkOptions() if (abs(skew) > theOptions->ttl()) { // TODO: If skew is negative, the option will be considered down // because of stale options. We should probably change this. - debugs(93, 1, "ICAP service's clock is skewed by " << skew << + debugs(93, DBG_IMPORTANT, "ICAP service's clock is skewed by " << skew << " seconds: " << cfg().uri); } } @@ -540,7 +540,7 @@ void Adaptation::Icap::ServiceRep::noteAdaptationAnswer(const Answer &answer) newOptions = new Adaptation::Icap::Options; newOptions->configure(r); } else { - debugs(93,1, "ICAP service got wrong options message " << status()); + debugs(93, DBG_IMPORTANT, "ICAP service got wrong options message " << status()); } handleNewOptions(newOptions); @@ -599,7 +599,7 @@ void Adaptation::Icap::ServiceRep::scheduleUpdate(time_t when) if (eventFind(&ServiceRep_noteTimeToUpdate, this)) eventDelete(&ServiceRep_noteTimeToUpdate, this); else - debugs(93,1, "XXX: ICAP service lost an update event."); + debugs(93, DBG_IMPORTANT, "XXX: ICAP service lost an update event."); updateScheduled = false; } diff --git a/src/auth/AclMaxUserIp.cc b/src/auth/AclMaxUserIp.cc index 8441183edb..11c157a1ab 100644 --- a/src/auth/AclMaxUserIp.cc +++ b/src/auth/AclMaxUserIp.cc @@ -79,7 +79,7 @@ void ACLMaxUserIP::parse() { if (maximum) { - debugs(28, 1, "Attempting to alter already set User max IP acl"); + debugs(28, DBG_IMPORTANT, "Attempting to alter already set User max IP acl"); return; } @@ -123,7 +123,7 @@ ACLMaxUserIP::match(Auth::UserRequest::Pointer auth_user_request, Ip::Address co if (authenticateAuthUserRequestIPCount(auth_user_request) <= maximum) return 0; - debugs(28, 1, "aclMatchUserMaxIP: user '" << auth_user_request->username() << "' tries to use too many IP addresses (max " << maximum << " allowed)!"); + debugs(28, DBG_IMPORTANT, "aclMatchUserMaxIP: user '" << auth_user_request->username() << "' tries to use too many IP addresses (max " << maximum << " allowed)!"); /* this is a match */ if (flags.strict) { diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 4321778b64..4fb31c394d 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -322,7 +322,7 @@ authDigestNonceUnlink(digest_nonce_h * nonce) if (nonce->references > 0) { -- nonce->references; } else { - debugs(29, 1, "authDigestNonceUnlink; Attempt to lower nonce " << nonce << " refcount below 0!"); + debugs(29, DBG_IMPORTANT, "authDigestNonceUnlink; Attempt to lower nonce " << nonce << " refcount below 0!"); } debugs(29, 9, "authDigestNonceUnlink: nonce '" << nonce << "' now at '" << nonce->references << "'."); diff --git a/src/auth/negotiate/UserRequest.cc b/src/auth/negotiate/UserRequest.cc index 0722c705da..1750c68ee5 100644 --- a/src/auth/negotiate/UserRequest.cc +++ b/src/auth/negotiate/UserRequest.cc @@ -203,7 +203,7 @@ Auth::Negotiate::UserRequest::authenticate(HttpRequest * aRequest, ConnStateData break; case Auth::Pending: - debugs(29, 1, HERE << "need to ask helper"); + debugs(29, DBG_IMPORTANT, HERE << "need to ask helper"); break; case Auth::Handshake: diff --git a/src/auth/ntlm/UserRequest.cc b/src/auth/ntlm/UserRequest.cc index 9fbf7b8e6b..5e4de53b93 100644 --- a/src/auth/ntlm/UserRequest.cc +++ b/src/auth/ntlm/UserRequest.cc @@ -197,7 +197,7 @@ Auth::Ntlm::UserRequest::authenticate(HttpRequest * aRequest, ConnStateData * co break; case Auth::Pending: - debugs(29, 1, HERE << "need to ask helper"); + debugs(29, DBG_IMPORTANT, HERE << "need to ask helper"); break; case Auth::Handshake: diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 2360ec5353..191ccb5363 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -425,7 +425,7 @@ parseOneConfigFile(const char *file_name, unsigned int depth) int err_count = 0; int is_pipe = 0; - debugs(3, 1, "Processing Configuration File: " << file_name << " (depth " << depth << ")"); + debugs(3, DBG_IMPORTANT, "Processing Configuration File: " << file_name << " (depth " << depth << ")"); if (depth > 16) { fatalf("WARNING: can't include %s: includes are nested too deeply (>16)!\n", file_name); return 1; @@ -744,7 +744,7 @@ configDoConfigure(void) if (!R->flags.override_expire) continue; - debugs(22, 1, "WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP"); break; } @@ -753,7 +753,7 @@ configDoConfigure(void) if (!R->flags.override_lastmod) continue; - debugs(22, 1, "WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP"); break; } @@ -762,7 +762,7 @@ configDoConfigure(void) if (!R->flags.reload_into_ims) continue; - debugs(22, 1, "WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP"); break; } @@ -771,7 +771,7 @@ configDoConfigure(void) if (!R->flags.ignore_reload) continue; - debugs(22, 1, "WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP"); break; } @@ -780,7 +780,7 @@ configDoConfigure(void) if (!R->flags.ignore_no_cache) continue; - debugs(22, 1, "WARNING: use of 'ignore-no-cache' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-no-cache' in 'refresh_pattern' violates HTTP"); break; } @@ -789,7 +789,7 @@ configDoConfigure(void) if (!R->flags.ignore_no_store) continue; - debugs(22, 1, "WARNING: use of 'ignore-no-store' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-no-store' in 'refresh_pattern' violates HTTP"); break; } @@ -797,7 +797,7 @@ configDoConfigure(void) for (R = Config.Refresh; R; R = R->next) { if (!R->flags.ignore_must_revalidate) continue; - debugs(22, 1, "WARNING: use of 'ignore-must-revalidate' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-must-revalidate' in 'refresh_pattern' violates HTTP"); break; } @@ -805,7 +805,7 @@ configDoConfigure(void) if (!R->flags.ignore_private) continue; - debugs(22, 1, "WARNING: use of 'ignore-private' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-private' in 'refresh_pattern' violates HTTP"); break; } @@ -814,7 +814,7 @@ configDoConfigure(void) if (!R->flags.ignore_auth) continue; - debugs(22, 1, "WARNING: use of 'ignore-auth' in 'refresh_pattern' violates HTTP"); + debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-auth' in 'refresh_pattern' violates HTTP"); break; } @@ -826,7 +826,7 @@ configDoConfigure(void) #else if (!Config.onoff.via) - debugs(22, 1, "WARNING: HTTP requires the use of Via"); + debugs(22, DBG_IMPORTANT, "WARNING: HTTP requires the use of Via"); #endif @@ -893,13 +893,13 @@ configDoConfigure(void) HttpRequestMethod::Configure(Config); #if USE_SSL - debugs(3, 1, "Initializing https proxy context"); + debugs(3, DBG_IMPORTANT, "Initializing https proxy context"); Config.ssl_client.sslContext = sslCreateClientContext(Config.ssl_client.cert, Config.ssl_client.key, Config.ssl_client.version, Config.ssl_client.cipher, Config.ssl_client.options, Config.ssl_client.flags, Config.ssl_client.cafile, Config.ssl_client.capath, Config.ssl_client.crlfile); for (peer *p = Config.peers; p != NULL; p = p->next) { if (p->use_ssl) { - debugs(3, 1, "Initializing cache_peer " << p->name << " SSL context"); + debugs(3, DBG_IMPORTANT, "Initializing cache_peer " << p->name << " SSL context"); p->sslContext = sslCreateClientContext(p->sslcert, p->sslkey, p->sslversion, p->sslcipher, p->ssloptions, p->sslflags, p->sslcafile, p->sslcapath, p->sslcrlfile); } } @@ -908,12 +908,12 @@ configDoConfigure(void) if (!s->sslBump) continue; - debugs(3, 1, "Initializing http_port " << s->s << " SSL context"); + debugs(3, DBG_IMPORTANT, "Initializing http_port " << s->s << " SSL context"); s->configureSslServerContext(); } for (AnyP::PortCfg *s = Config.Sockaddr.https; s != NULL; s = s->next) { - debugs(3, 1, "Initializing https_port " << s->s << " SSL context"); + debugs(3, DBG_IMPORTANT, "Initializing https_port " << s->s << " SSL context"); s->configureSslServerContext(); } @@ -1029,7 +1029,7 @@ parseTimeUnits(const char *unit, bool allowMsec) if (!strncasecmp(unit, T_DECADE_STR, strlen(T_DECADE_STR))) return static_cast(86400 * 1000 * 365.2522 * 10); - debugs(3, 1, "parseTimeUnits: unknown time unit '" << unit << "'"); + debugs(3, DBG_IMPORTANT, "parseTimeUnits: unknown time unit '" << unit << "'"); return 0; } diff --git a/src/client_db.cc b/src/client_db.cc index c8456cebd8..03bc1ecc0b 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -137,7 +137,7 @@ ClientInfo * clientdbGetInfo(const Ip::Address &addr) c = (ClientInfo *) hash_lookup(client_table, key); if (c==NULL) { - debugs(77,1,"Client db does not contain information for given IP address "<<(const char*)key); + debugs(77, DBG_IMPORTANT,"Client db does not contain information for given IP address "<<(const char*)key); return NULL; } return c; diff --git a/src/client_side.cc b/src/client_side.cc index 946ffd7a5f..4276eeb2d8 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -802,10 +802,10 @@ ConnStateData::~ConnStateData() debugs(33, 3, HERE << clientConnection); if (isOpen()) - debugs(33, 1, "BUG: ConnStateData did not close " << clientConnection); + debugs(33, DBG_IMPORTANT, "BUG: ConnStateData did not close " << clientConnection); if (!flags.swanSang) - debugs(33, 1, "BUG: ConnStateData was not destroyed properly; " << clientConnection); + debugs(33, DBG_IMPORTANT, "BUG: ConnStateData was not destroyed properly; " << clientConnection); cbdataReferenceDone(port); @@ -1200,7 +1200,7 @@ clientIfRangeMatch(ClientHttpRequest * http, HttpReply * rep) return 0; /* entity has no etag to compare with! */ if (spec.tag.weak || rep_tag.weak) { - debugs(33, 1, "clientIfRangeMatch: Weak ETags are not allowed in If-Range: " << spec.tag.str << " ? " << rep_tag.str); + debugs(33, DBG_IMPORTANT, "clientIfRangeMatch: Weak ETags are not allowed in If-Range: " << spec.tag.str << " ? " << rep_tag.str); return 0; /* must use strong validator for sub-range requests */ } @@ -2206,7 +2206,7 @@ parseHttpRequest(ConnStateData *csd, HttpParser *hp, HttpRequestMethod * method_ if (*method_p == METHOD_NONE) { /* XXX need a way to say "this many character length string" */ - debugs(33, 1, "clientParseRequestMethod: Unsupported method in request '" << hp->buf << "'"); + debugs(33, DBG_IMPORTANT, "clientParseRequestMethod: Unsupported method in request '" << hp->buf << "'"); hp->request_parse_status = HTTP_METHOD_NOT_ALLOWED; return parseHttpRequestAbort(csd, "error:unsupported-request-method"); } @@ -3275,7 +3275,7 @@ connStateCreate(const Comm::ConnectionPointer &client, AnyP::PortCfg *port) static int reported = 0; if (!reported) { - debugs(33, 1, "Notice: httpd_accel_no_pmtu_disc not supported on your platform"); + debugs(33, DBG_IMPORTANT, "Notice: httpd_accel_no_pmtu_disc not supported on your platform"); reported = 1; } #endif @@ -3459,12 +3459,12 @@ clientNegotiateSSL(int fd, void *data) } case SSL_ERROR_ZERO_RETURN: - debugs(83, 1, "clientNegotiateSSL: Error negotiating SSL connection on FD " << fd << ": Closed by client"); + debugs(83, DBG_IMPORTANT, "clientNegotiateSSL: Error negotiating SSL connection on FD " << fd << ": Closed by client"); comm_close(fd); return; default: - debugs(83, 1, "clientNegotiateSSL: Error negotiating SSL connection on FD " << + debugs(83, DBG_IMPORTANT, "clientNegotiateSSL: Error negotiating SSL connection on FD " << fd << ": " << ERR_error_string(ERR_get_error(), NULL) << " (" << ssl_error << "/" << ret << ")"); comm_close(fd); @@ -3678,7 +3678,7 @@ void ConnStateData::sslCrtdHandleReply(const char * reply) { if (!reply) { - debugs(1, 1, HERE << "\"ssl_crtd\" helper return reply"); + debugs(1, DBG_IMPORTANT, HERE << "\"ssl_crtd\" helper return reply"); } else { Ssl::CrtdMessage reply_message; if (reply_message.parse(reply, strlen(reply)) != Ssl::CrtdMessage::OK) { @@ -3865,7 +3865,7 @@ ConnStateData::getSslContextDone(SSL_CTX * sslContext, bool isNew) // If generated ssl context = NULL, try to use static ssl context. if (!sslContext) { if (!port->staticSslContext) { - debugs(83, 1, "Closing SSL " << clientConnection->remote << " as lacking SSL context"); + debugs(83, DBG_IMPORTANT, "Closing SSL " << clientConnection->remote << " as lacking SSL context"); clientConnection->close(); return; } else { @@ -3991,8 +3991,8 @@ clientHttpConnectionsOpen(void) for (s = Config.Sockaddr.http; s; s = s->next) { if (MAXTCPLISTENPORTS == NHttpSockets) { - debugs(1, 1, "WARNING: You have too many 'http_port' lines."); - debugs(1, 1, " The limit is " << MAXTCPLISTENPORTS << " HTTP ports."); + debugs(1, DBG_IMPORTANT, "WARNING: You have too many 'http_port' lines."); + debugs(1, DBG_IMPORTANT, " The limit is " << MAXTCPLISTENPORTS << " HTTP ports."); continue; } @@ -4040,13 +4040,13 @@ clientHttpsConnectionsOpen(void) for (s = Config.Sockaddr.https; s; s = s->next) { if (MAXTCPLISTENPORTS == NHttpSockets) { - debugs(1, 1, "Ignoring 'https_port' lines exceeding the limit."); - debugs(1, 1, "The limit is " << MAXTCPLISTENPORTS << " HTTPS ports."); + debugs(1, DBG_IMPORTANT, "Ignoring 'https_port' lines exceeding the limit."); + debugs(1, DBG_IMPORTANT, "The limit is " << MAXTCPLISTENPORTS << " HTTPS ports."); continue; } if (!s->staticSslContext) { - debugs(1, 1, "Ignoring https_port " << s->s << + debugs(1, DBG_IMPORTANT, "Ignoring https_port " << s->s << " due to SSL initialization failure."); continue; } @@ -4101,7 +4101,7 @@ clientListenerConnectionOpened(AnyP::PortCfg *s, const Ipc::FdNoteId portTypeNot // TCP: setup a job to handle accept() with subscribed handler AsyncJob::Start(new Comm::TcpAcceptor(s->listenConn, FdNote(portTypeNote), sub)); - debugs(1, 1, "Accepting " << + debugs(1, DBG_IMPORTANT, "Accepting " << (s->intercepted ? "NAT intercepted " : "") << (s->spoof_client_ip ? "TPROXY spoofing " : "") << (s->sslBump ? "SSL bumped " : "") << @@ -4129,7 +4129,7 @@ clientHttpConnectionsClose(void) { for (AnyP::PortCfg *s = Config.Sockaddr.http; s; s = s->next) { if (s->listenConn != NULL) { - debugs(1, 1, "Closing HTTP port " << s->listenConn->local); + debugs(1, DBG_IMPORTANT, "Closing HTTP port " << s->listenConn->local); s->listenConn->close(); s->listenConn = NULL; } @@ -4138,7 +4138,7 @@ clientHttpConnectionsClose(void) #if USE_SSL for (AnyP::PortCfg *s = Config.Sockaddr.https; s; s = s->next) { if (s->listenConn != NULL) { - debugs(1, 1, "Closing HTTPS port " << s->listenConn->local); + debugs(1, DBG_IMPORTANT, "Closing HTTPS port " << s->listenConn->local); s->listenConn->close(); s->listenConn = NULL; } @@ -4167,7 +4167,7 @@ varyEvaluateMatch(StoreEntry * entry, HttpRequest * request) if (!has_vary || !entry->mem_obj->vary_headers) { if (vary) { /* Oops... something odd is going on here.. */ - debugs(33, 1, "varyEvaluateMatch: Oops. Not a Vary object on second attempt, '" << + debugs(33, DBG_IMPORTANT, "varyEvaluateMatch: Oops. Not a Vary object on second attempt, '" << entry->mem_obj->url << "' '" << vary << "'"); safe_free(request->vary_headers); return VARY_CANCEL; @@ -4209,7 +4209,7 @@ varyEvaluateMatch(StoreEntry * entry, HttpRequest * request) /* Oops.. we have already been here and still haven't * found the requested variant. Bail out */ - debugs(33, 1, "varyEvaluateMatch: Oops. Not a Vary match on second attempt, '" << + debugs(33, DBG_IMPORTANT, "varyEvaluateMatch: Oops. Not a Vary match on second attempt, '" << entry->mem_obj->url << "' '" << vary << "'"); return VARY_CANCEL; } diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 24155320a2..5fa2f06b32 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -493,7 +493,7 @@ clientReplyContext::cacheHit(StoreIOBuffer result) assert(http->logType == LOG_TCP_HIT); if (strcmp(e->mem_obj->url, urlCanonical(r)) != 0) { - debugs(33, 1, "clientProcessHit: URL mismatch, '" << e->mem_obj->url << "' != '" << urlCanonical(r) << "'"); + debugs(33, DBG_IMPORTANT, "clientProcessHit: URL mismatch, '" << e->mem_obj->url << "' != '" << urlCanonical(r) << "'"); processMiss(); return; } @@ -524,7 +524,7 @@ clientReplyContext::cacheHit(StoreIOBuffer result) case VARY_CANCEL: /* varyEvaluateMatch found a object loop. Process as miss */ - debugs(88, 1, "clientProcessHit: Vary object loop!"); + debugs(88, DBG_IMPORTANT, "clientProcessHit: Vary object loop!"); processMiss(); return; } @@ -1120,18 +1120,18 @@ clientHttpRequestStatus(int fd, ClientHttpRequest const *http) { #if SIZEOF_INT64_T == 4 if (http->out.size > 0x7FFF0000) { - debugs(88, 1, "WARNING: closing FD " << fd << " to prevent out.size counter overflow"); - debugs(88, 1, "\tclient " << http->getConn()->peer); - debugs(88, 1, "\treceived " << http->out.size << " bytes"); - debugs(88, 1, "\tURI " << http->log_uri); + debugs(88, DBG_IMPORTANT, "WARNING: closing FD " << fd << " to prevent out.size counter overflow"); + debugs(88, DBG_IMPORTANT, "\tclient " << http->getConn()->peer); + debugs(88, DBG_IMPORTANT, "\treceived " << http->out.size << " bytes"); + debugs(88, DBG_IMPORTANT, "\tURI " << http->log_uri); return 1; } if (http->out.offset > 0x7FFF0000) { - debugs(88, 1, "WARNING: closing FD " << fd < " to prevent out.offset counter overflow"); - debugs(88, 1, "\tclient " << http->getConn()->peer); - debugs(88, 1, "\treceived " << http->out.size << " bytes, offset " << http->out.offset); - debugs(88, 1, "\tURI " << http->log_uri); + debugs(88, DBG_IMPORTANT, "WARNING: closing FD " << fd < " to prevent out.offset counter overflow"); + debugs(88, DBG_IMPORTANT, "\tclient " << http->getConn()->peer); + debugs(88, DBG_IMPORTANT, "\treceived " << http->out.size << " bytes, offset " << http->out.offset); + debugs(88, DBG_IMPORTANT, "\tURI " << http->log_uri); return 1; } diff --git a/src/comm.cc b/src/comm.cc index ace7f7b09f..32adceb352 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -385,7 +385,7 @@ comm_local_port(int fd) temp.InitAddrInfo(addr); if (getsockname(fd, addr->ai_addr, &(addr->ai_addrlen)) ) { - debugs(50, 1, "comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD " << fd << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD " << fd << ": " << xstrerror()); temp.FreeAddrInfo(addr); return 0; } @@ -475,7 +475,7 @@ comm_set_v6only(int fd, int tos) { #ifdef IPV6_V6ONLY if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &tos, sizeof(int)) < 0) { - debugs(50, 1, "comm_open: setsockopt(IPV6_V6ONLY) " << (tos?"ON":"OFF") << " for FD " << fd << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "comm_open: setsockopt(IPV6_V6ONLY) " << (tos?"ON":"OFF") << " for FD " << fd << ": " << xstrerror()); } #else debugs(50, 0, "WARNING: comm_open: setsockopt(IPV6_V6ONLY) not supported on this platform"); @@ -661,7 +661,7 @@ comm_apply_flags(int new_socket, if ( (flags & COMM_DOBIND) || addr.GetPort() > 0 || !addr.IsAnyAddr() ) { if ( !(flags & COMM_DOBIND) && addr.IsAnyAddr() ) - debugs(5,1,"WARNING: Squid is attempting to bind() port " << addr << " without being a listener."); + debugs(5, DBG_IMPORTANT,"WARNING: Squid is attempting to bind() port " << addr << " without being a listener."); if ( addr.IsNoAddr() ) debugs(5,0,"CRITICAL: Squid is attempting to bind() port " << addr << "!!"); @@ -915,9 +915,9 @@ comm_connect_addr(int sock, const Ip::Address &address) F->remote_port = address.GetPort(); /* remote_port is HS */ if (status == COMM_OK) { - debugs(5, 10, "comm_connect_addr: FD " << sock << " connected to " << address); + debugs(5, DBG_DATA, "comm_connect_addr: FD " << sock << " connected to " << address); } else if (status == COMM_INPROGRESS) { - debugs(5, 10, "comm_connect_addr: FD " << sock << " connection pending"); + debugs(5, DBG_DATA, "comm_connect_addr: FD " << sock << " connection pending"); } return status; @@ -1192,7 +1192,7 @@ comm_udp_sendto(int fd, if (ECONNREFUSED != errno) #endif - debugs(50, 1, "comm_udp_sendto: FD " << fd << ", (family=" << fd_table[fd].sock_family << ") " << to_addr << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "comm_udp_sendto: FD " << fd << ", (family=" << fd_table[fd].sock_family << ") " << to_addr << ": " << xstrerror()); return COMM_ERROR; } @@ -1288,19 +1288,19 @@ commSetReuseAddr(int fd) int on = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)) < 0) - debugs(50, 1, "commSetReuseAddr: FD " << fd << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "commSetReuseAddr: FD " << fd << ": " << xstrerror()); } static void commSetTcpRcvbuf(int fd, int size) { if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof(size)) < 0) - debugs(50, 1, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror()); if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *) &size, sizeof(size)) < 0) - debugs(50, 1, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror()); #ifdef TCP_WINDOW_CLAMP if (setsockopt(fd, SOL_TCP, TCP_WINDOW_CLAMP, (char *) &size, sizeof(size)) < 0) - debugs(50, 1, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror()); #endif } @@ -1401,7 +1401,7 @@ commSetTcpNoDelay(int fd) int on = 1; if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)) < 0) - debugs(50, 1, "commSetTcpNoDelay: FD " << fd << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "commSetTcpNoDelay: FD " << fd << ": " << xstrerror()); fd_table[fd].flags.nodelay = 1; } @@ -1416,23 +1416,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) - debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); + debugs(5, DBG_IMPORTANT, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } #endif #ifdef TCP_KEEPIDLE if (idle) { if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(on)) < 0) - debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); + debugs(5, DBG_IMPORTANT, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } #endif #ifdef TCP_KEEPINTVL if (interval) { if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(on)) < 0) - debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); + debugs(5, DBG_IMPORTANT, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } #endif if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof(on)) < 0) - debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror()); + debugs(5, DBG_IMPORTANT, "commSetKeepalive: FD " << fd << ": " << xstrerror()); } void diff --git a/src/comm/ModKqueue.cc b/src/comm/ModKqueue.cc index cb48c11ab1..072091afef 100644 --- a/src/comm/ModKqueue.cc +++ b/src/comm/ModKqueue.cc @@ -316,7 +316,7 @@ Comm::DoSelect(int msec) default: /* Bad! -- adrian */ - debugs(5, 1, "comm_select: kevent returned " << ke[i].filter << "!"); + debugs(5, DBG_IMPORTANT, "comm_select: kevent returned " << ke[i].filter << "!"); break; } } diff --git a/src/comm/ModPoll.cc b/src/comm/ModPoll.cc index c2b94c076b..758b99cfb5 100644 --- a/src/comm/ModPoll.cc +++ b/src/comm/ModPoll.cc @@ -259,7 +259,7 @@ comm_check_incoming_poll_handlers(int nfds, int *fds) fd_table[fd].read_handler = NULL; hdl(fd, fd_table[fd].read_data); } else if (pfds[i].events & POLLRDNORM) - debugs(5, 1, "comm_poll_incoming: FD " << fd << " NULL read handler"); + debugs(5, DBG_IMPORTANT, "comm_poll_incoming: FD " << fd << " NULL read handler"); } if (revents & (POLLWRNORM | POLLOUT | POLLHUP | POLLERR)) { @@ -267,7 +267,7 @@ comm_check_incoming_poll_handlers(int nfds, int *fds) fd_table[fd].write_handler = NULL; hdl(fd, fd_table[fd].write_data); } else if (pfds[i].events & POLLWRNORM) - debugs(5, 1, "comm_poll_incoming: FD " << fd << " NULL write_handler"); + debugs(5, DBG_IMPORTANT, "comm_poll_incoming: FD " << fd << " NULL write_handler"); } } diff --git a/src/comm/ModSelect.cc b/src/comm/ModSelect.cc index b1346e08dc..d5da9eccb0 100644 --- a/src/comm/ModSelect.cc +++ b/src/comm/ModSelect.cc @@ -252,7 +252,7 @@ comm_check_incoming_select_handlers(int nfds, int *fds) commUpdateReadBits(fd, NULL); hdl(fd, fd_table[fd].read_data); } else { - debugs(5, 1, "comm_select_incoming: FD " << fd << " NULL read handler"); + debugs(5, DBG_IMPORTANT, "comm_select_incoming: FD " << fd << " NULL read handler"); } } @@ -262,7 +262,7 @@ comm_check_incoming_select_handlers(int nfds, int *fds) commUpdateWriteBits(fd, NULL); hdl(fd, fd_table[fd].write_data); } else { - debugs(5, 1, "comm_select_incoming: FD " << fd << " NULL write handler"); + debugs(5, DBG_IMPORTANT, "comm_select_incoming: FD " << fd << " NULL write handler"); } } } diff --git a/src/comm/ModSelectWin32.cc b/src/comm/ModSelectWin32.cc index 4d3cf7ebaa..11149ddb3b 100644 --- a/src/comm/ModSelectWin32.cc +++ b/src/comm/ModSelectWin32.cc @@ -255,7 +255,7 @@ comm_check_incoming_select_handlers(int nfds, int *fds) commUpdateReadBits(fd, NULL); hdl(fd, fd_table[fd].read_data); } else { - debugs(5, 1, "comm_select_incoming: FD " << fd << " NULL read handler"); + debugs(5, DBG_IMPORTANT, "comm_select_incoming: FD " << fd << " NULL read handler"); } } @@ -265,7 +265,7 @@ comm_check_incoming_select_handlers(int nfds, int *fds) commUpdateWriteBits(fd, NULL); hdl(fd, fd_table[fd].write_data); } else { - debugs(5, 1, "comm_select_incoming: FD " << fd << " NULL write handler"); + debugs(5, DBG_IMPORTANT, "comm_select_incoming: FD " << fd << " NULL write handler"); } } } diff --git a/src/comm/TcpAcceptor.cc b/src/comm/TcpAcceptor.cc index f8ceeedb69..31fb6651cf 100644 --- a/src/comm/TcpAcceptor.cc +++ b/src/comm/TcpAcceptor.cc @@ -317,7 +317,7 @@ Comm::TcpAcceptor::oldAccept(Comm::ConnectionPointer &details) debugs(50, 3, HERE << status() << ": " << xstrerror()); return COMM_ERROR; } else { - debugs(50, 1, HERE << status() << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, HERE << status() << ": " << xstrerror()); return COMM_ERROR; } } diff --git a/src/comm/Write.cc b/src/comm/Write.cc index 641e7bda8f..455b1f0183 100644 --- a/src/comm/Write.cc +++ b/src/comm/Write.cc @@ -98,7 +98,7 @@ Comm::HandleWrite(int fd, void *data) /* we wrote data - drain them from bucket */ clientInfo->bucketSize -= len; if (clientInfo->bucketSize < 0.0) { - debugs(5,1, HERE << "drained too much"); // should not happen + debugs(5, DBG_IMPORTANT, HERE << "drained too much"); // should not happen clientInfo->bucketSize = 0; } } diff --git a/src/disk.cc b/src/disk.cc index 94458eb92e..89cbf81157 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -254,7 +254,7 @@ diskHandleWrite(int fd, void *notused) if (len < 0) { if (!ignoreErrno(errno)) { status = errno == ENOSPC ? DISK_NO_SPACE_LEFT : DISK_ERROR; - debugs(50, 1, "diskHandleWrite: FD " << fd << ": disk write error: " << xstrerror()); + debugs(50, DBG_IMPORTANT, "diskHandleWrite: FD " << fd << ": disk write error: " << xstrerror()); /* * If there is no write callback, then this file is @@ -299,7 +299,7 @@ diskHandleWrite(int fd, void *notused) q->buf_offset += len; if (q->buf_offset > q->len) - debugs(50, 1, "diskHandleWriteComplete: q->buf_offset > q->len (" << + debugs(50, DBG_IMPORTANT, "diskHandleWriteComplete: q->buf_offset > q->len (" << q << "," << (int) q->buf_offset << ", " << q->len << ", " << len << " FD " << fd << ")"); @@ -464,7 +464,7 @@ diskHandleRead(int fd, void *data) return; } - debugs(50, 1, "diskHandleRead: FD " << fd << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "diskHandleRead: FD " << fd << ": " << xstrerror()); len = 0; rc = DISK_ERROR; } else if (len == 0) { @@ -510,7 +510,7 @@ safeunlink(const char *s, int quiet) ++ statCounter.syscalls.disk.unlinks; if (unlink(s) < 0 && !quiet) - debugs(50, 1, "safeunlink: Couldn't delete " << s << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "safeunlink: Couldn't delete " << s << ": " << xstrerror()); } /* diff --git a/src/dns.cc b/src/dns.cc index a147aa20e4..38a816a2d7 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -128,7 +128,7 @@ dnsSubmit(const char *lookup, HLPCB * callback, void *data) if (squid_curtime - first_warn > 3 * 60) fatal("DNS servers not responding for 3 minutes"); - debugs(34, 1, "dnsSubmit: queue overload, rejecting " << lookup); + debugs(34, DBG_IMPORTANT, "dnsSubmit: queue overload, rejecting " << lookup); callback(data, (char *)"$fail Temporary network problem, please retry later"); diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 3b7149f742..3df5433bed 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -353,7 +353,7 @@ idnsParseNameservers(void) wordlist *w; for (w = Config.dns_nameservers; w; w = w->next) { - debugs(78, 1, "Adding nameserver " << w->key << " from squid.conf"); + debugs(78, DBG_IMPORTANT, "Adding nameserver " << w->key << " from squid.conf"); idnsAddNameserver(w->key); } } @@ -368,7 +368,7 @@ idnsParseResolvConf(void) fp = fopen(_PATH_RESCONF, "r"); if (fp == NULL) { - debugs(78, 1, "" << _PATH_RESCONF << ": " << xstrerror()); + debugs(78, DBG_IMPORTANT, "" << _PATH_RESCONF << ": " << xstrerror()); return; } @@ -387,7 +387,7 @@ idnsParseResolvConf(void) if (NULL == t) continue; - debugs(78, 1, "Adding nameserver " << t << " from " << _PATH_RESCONF); + debugs(78, DBG_IMPORTANT, "Adding nameserver " << t << " from " << _PATH_RESCONF); idnsAddNameserver(t); } else if (strcasecmp(t, "domain") == 0) { @@ -397,7 +397,7 @@ idnsParseResolvConf(void) if (NULL == t) continue; - debugs(78, 1, "Adding domain " << t << " from " << _PATH_RESCONF); + debugs(78, DBG_IMPORTANT, "Adding domain " << t << " from " << _PATH_RESCONF); idnsAddPathComponent(t); } else if (strcasecmp(t, "search") == 0) { @@ -408,7 +408,7 @@ idnsParseResolvConf(void) if (NULL == t) continue; - debugs(78, 1, "Adding domain " << t << " from " << _PATH_RESCONF); + debugs(78, DBG_IMPORTANT, "Adding domain " << t << " from " << _PATH_RESCONF); idnsAddPathComponent(t); } @@ -425,7 +425,7 @@ idnsParseResolvConf(void) if (ndots < 1) ndots = 1; - debugs(78, 1, "Adding ndots " << ndots << " from " << _PATH_RESCONF); + debugs(78, DBG_IMPORTANT, "Adding ndots " << ndots << " from " << _PATH_RESCONF); } } } @@ -458,7 +458,7 @@ idnsParseWIN32SearchList(const char * Separator) if (Result == ERROR_SUCCESS && Size) { t = (char *) xmalloc(Size); RegQueryValueEx(hndKey, "Domain", NULL, &Type, (LPBYTE) t, &Size); - debugs(78, 1, "Adding domain " << t << " from Registry"); + debugs(78, DBG_IMPORTANT, "Adding domain " << t << " from Registry"); idnsAddPathComponent(t); xfree(t); } @@ -471,7 +471,7 @@ idnsParseWIN32SearchList(const char * Separator) while (token) { idnsAddPathComponent(token); - debugs(78, 1, "Adding domain " << token << " from Registry"); + debugs(78, DBG_IMPORTANT, "Adding domain " << token << " from Registry"); token = strtok(NULL, Separator); } xfree(t); @@ -511,7 +511,7 @@ idnsParseWIN32Registry(void) while (token) { idnsAddNameserver(token); - debugs(78, 1, "Adding DHCP nameserver " << token << " from Registry"); + debugs(78, DBG_IMPORTANT, "Adding DHCP nameserver " << token << " from Registry"); token = strtok(NULL, ","); } xfree(t); @@ -525,7 +525,7 @@ idnsParseWIN32Registry(void) token = strtok(t, ", "); while (token) { - debugs(78, 1, "Adding nameserver " << token << " from Registry"); + debugs(78, DBG_IMPORTANT, "Adding nameserver " << token << " from Registry"); idnsAddNameserver(token); token = strtok(NULL, ", "); } @@ -578,7 +578,7 @@ idnsParseWIN32Registry(void) RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, &Type, (LPBYTE)t, &Size); token = strtok(t, ", "); while (token) { - debugs(78, 1, "Adding DHCP nameserver " << token << " from Registry"); + debugs(78, DBG_IMPORTANT, "Adding DHCP nameserver " << token << " from Registry"); idnsAddNameserver(token); token = strtok(NULL, ", "); } @@ -591,7 +591,7 @@ idnsParseWIN32Registry(void) RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, (LPBYTE)t, &Size); token = strtok(t, ", "); while (token) { - debugs(78, 1, "Adding nameserver " << token << " from Registry"); + debugs(78, DBG_IMPORTANT, "Adding nameserver " << token << " from Registry"); idnsAddNameserver(token); token = strtok(NULL, ", "); } @@ -635,7 +635,7 @@ idnsParseWIN32Registry(void) token = strtok(t, ", "); while (token) { - debugs(78, 1, "Adding nameserver " << token << " from Registry"); + debugs(78, DBG_IMPORTANT, "Adding nameserver " << token << " from Registry"); idnsAddNameserver(token); token = strtok(NULL, ", "); } @@ -648,7 +648,7 @@ idnsParseWIN32Registry(void) break; default: - debugs(78, 1, "Failed to read nameserver from Registry: Unknown System Type."); + debugs(78, DBG_IMPORTANT, "Failed to read nameserver from Registry: Unknown System Type."); return; } } @@ -802,7 +802,7 @@ idnsInitVCConnected(const Comm::ConnectionPointer &conn, comm_err_t status, int char buf[MAX_IPSTRLEN] = ""; if (vc->ns < nns) nameservers[vc->ns].S.NtoA(buf,MAX_IPSTRLEN); - debugs(78, 1, HERE << "Failed to connect to nameserver " << buf << " using TCP."); + debugs(78, DBG_IMPORTANT, HERE << "Failed to connect to nameserver " << buf << " using TCP."); return; } @@ -871,7 +871,7 @@ idnsSendQueryVC(idns_query * q, int ns) if (!vc) { char buf[MAX_IPSTRLEN]; - debugs(78, 1, "idnsSendQuery: Failed to initiate TCP connection to nameserver " << nameservers[ns].S.NtoA(buf,MAX_IPSTRLEN) << "!"); + debugs(78, DBG_IMPORTANT, "idnsSendQuery: Failed to initiate TCP connection to nameserver " << nameservers[ns].S.NtoA(buf,MAX_IPSTRLEN) << "!"); return; } @@ -891,12 +891,12 @@ static void idnsSendQuery(idns_query * q) { if (DnsSocketA < 0 && DnsSocketB < 0) { - debugs(78, 1, "WARNING: idnsSendQuery: Can't send query, no DNS socket!"); + debugs(78, DBG_IMPORTANT, "WARNING: idnsSendQuery: Can't send query, no DNS socket!"); return; } if (nns <= 0) { - debugs(78, 1, "WARNING: idnsSendQuery: Can't send query, no DNS nameservers known!"); + debugs(78, DBG_IMPORTANT, "WARNING: idnsSendQuery: Can't send query, no DNS nameservers known!"); return; } @@ -925,9 +925,9 @@ idnsSendQuery(idns_query * q) q->sent_t = current_time; if (y < 0 && nameservers[ns].S.IsIPv6()) - debugs(50, 1, "idnsSendQuery: FD " << DnsSocketB << ": sendto: " << xstrerror()); + debugs(50, DBG_IMPORTANT, "idnsSendQuery: FD " << DnsSocketB << ": sendto: " << xstrerror()); if (x < 0 && nameservers[ns].S.IsIPv4()) - debugs(50, 1, "idnsSendQuery: FD " << DnsSocketA << ": sendto: " << xstrerror()); + debugs(50, DBG_IMPORTANT, "idnsSendQuery: FD " << DnsSocketA << ": sendto: " << xstrerror()); } while ( (x<0 && y<0) && q->nsends % nns != 0); @@ -989,7 +989,7 @@ idnsQueryID(void) ++id; if (id == first_id) { - debugs(78, 1, "idnsQueryID: Warning, too many pending DNS requests"); + debugs(78, DBG_IMPORTANT, "idnsQueryID: Warning, too many pending DNS requests"); break; } } @@ -1097,7 +1097,7 @@ idnsGrokReply(const char *buf, size_t sz, int from_ns) n = rfc1035MessageUnpack(buf, sz, &message); if (message == NULL) { - debugs(78, 1, "idnsGrokReply: Malformed DNS response"); + debugs(78, DBG_IMPORTANT, "idnsGrokReply: Malformed DNS response"); return; } @@ -1284,7 +1284,7 @@ idnsRead(int fd, void *data) if (errno != ECONNREFUSED && errno != EHOSTUNREACH) #endif - debugs(50, 1, "idnsRead: FD " << fd << " recvfrom: " << xstrerror()); + debugs(50, DBG_IMPORTANT, "idnsRead: FD " << fd << " recvfrom: " << xstrerror()); break; } @@ -1312,10 +1312,10 @@ idnsRead(int fd, void *data) static time_t last_warning = 0; if (squid_curtime - last_warning > 60) { - debugs(78, 1, "WARNING: Reply from unknown nameserver " << from); + debugs(78, DBG_IMPORTANT, "WARNING: Reply from unknown nameserver " << from); last_warning = squid_curtime; } else { - debugs(78, 1, "WARNING: Reply from unknown nameserver " << from << " (retrying..." << (squid_curtime-last_warning) << "<=60)" ); + debugs(78, DBG_IMPORTANT, "WARNING: Reply from unknown nameserver " << from << " (retrying..." << (squid_curtime-last_warning) << "<=60)" ); } continue; } @@ -1515,12 +1515,12 @@ dnsInit(void) */ if (DnsSocketB >= 0) { comm_local_port(DnsSocketB); - debugs(78, 1, "DNS Socket created at " << addrV6 << ", FD " << DnsSocketB); + debugs(78, DBG_IMPORTANT, "DNS Socket created at " << addrV6 << ", FD " << DnsSocketB); Comm::SetSelect(DnsSocketB, COMM_SELECT_READ, idnsRead, NULL, 0); } if (DnsSocketA >= 0) { comm_local_port(DnsSocketA); - debugs(78, 1, "DNS Socket created at " << addrV4 << ", FD " << DnsSocketA); + debugs(78, DBG_IMPORTANT, "DNS Socket created at " << addrV4 << ", FD " << DnsSocketA); Comm::SetSelect(DnsSocketA, COMM_SELECT_READ, idnsRead, NULL, 0); } } @@ -1539,14 +1539,14 @@ dnsInit(void) #endif if (0 == nns) { - debugs(78, 1, "Warning: Could not find any nameservers. Trying to use localhost"); + debugs(78, DBG_IMPORTANT, "Warning: Could not find any nameservers. Trying to use localhost"); #if _SQUID_WINDOWS_ - debugs(78, 1, "Please check your TCP-IP settings or /etc/resolv.conf file"); + debugs(78, DBG_IMPORTANT, "Please check your TCP-IP settings or /etc/resolv.conf file"); #else - debugs(78, 1, "Please check your /etc/resolv.conf file"); + debugs(78, DBG_IMPORTANT, "Please check your /etc/resolv.conf file"); #endif - debugs(78, 1, "or use the 'dns_nameservers' option in squid.conf."); + debugs(78, DBG_IMPORTANT, "or use the 'dns_nameservers' option in squid.conf."); idnsAddNameserver("127.0.0.1"); } diff --git a/src/esi/Esi.cc b/src/esi/Esi.cc index 083e9a88ed..aa82678da8 100644 --- a/src/esi/Esi.cc +++ b/src/esi/Esi.cc @@ -989,7 +989,7 @@ ESIContext::addStackElement (ESIElement::Pointer element) debugs(86, 5, "ESIContext::addStackElement: About to add ESI Node " << element.getRaw()); if (!parserState.top()->addElement(element)) { - debugs(86, 1, "ESIContext::addStackElement: failed to add esi node, probable error in ESI template"); + debugs(86, DBG_IMPORTANT, "ESIContext::addStackElement: failed to add esi node, probable error in ESI template"); flags.error = 1; } else { /* added ok, push onto the stack */ @@ -1241,7 +1241,7 @@ ESIContext::addLiteral (const char *s, int len) ESIElement::Pointer element (new esiLiteral (this, s, len)); if (!parserState.top()->addElement(element)) { - debugs(86, 1, "ESIContext::addLiteral: failed to add esi node, probable error in ESI template"); + debugs(86, DBG_IMPORTANT, "ESIContext::addLiteral: failed to add esi node, probable error in ESI template"); flags.error = 1; } } @@ -1749,7 +1749,7 @@ esiTry::addElement(ESIElement::Pointer element) if (dynamic_cast(element.getRaw())) { if (attempt.getRaw()) { - debugs(86, 1, "esiTryAdd: Failed for " << this << " - try allready has an attempt node (section 3.4)"); + debugs(86, DBG_IMPORTANT, "esiTryAdd: Failed for " << this << " - try allready has an attempt node (section 3.4)"); return false; } @@ -1759,7 +1759,7 @@ esiTry::addElement(ESIElement::Pointer element) if (dynamic_cast(element.getRaw())) { if (except.getRaw()) { - debugs(86, 1, "esiTryAdd: Failed for " << this << " - try already has an except node (section 3.4)"); + debugs(86, DBG_IMPORTANT, "esiTryAdd: Failed for " << this << " - try already has an except node (section 3.4)"); return false; } @@ -1767,7 +1767,7 @@ esiTry::addElement(ESIElement::Pointer element) return true; } - debugs(86, 1, "esiTryAdd: Failed to add element " << element.getRaw() << " to try " << this << ", incorrect element type (see section 3.4)"); + debugs(86, DBG_IMPORTANT, "esiTryAdd: Failed to add element " << element.getRaw() << " to try " << this << ", incorrect element type (see section 3.4)"); return false; } @@ -2346,7 +2346,7 @@ esiWhen::esiWhen (esiTreeParentPtr aParent, int attrcount, const char **attr,ESI /* ignore mistyped attributes. * TODO:? error on these for user feedback - config parameter needed */ - debugs(86, 1, "Found misttyped attribute on ESI When clause"); + debugs(86, DBG_IMPORTANT, "Found misttyped attribute on ESI When clause"); } } diff --git a/src/esi/Expression.cc b/src/esi/Expression.cc index a230ea6267..98dfacb950 100644 --- a/src/esi/Expression.cc +++ b/src/esi/Expression.cc @@ -174,7 +174,7 @@ membercompare(stackmember a, stackmember b) return 0; } else { /* TODO: numeric to string conversion ? */ - debugs(86, 1, "strcmp with non-string"); + debugs(86, DBG_IMPORTANT, "strcmp with non-string"); return -2; } } else if (a.valuestored == ESI_LITERAL_FLOAT) { @@ -194,7 +194,7 @@ membercompare(stackmember a, stackmember b) return 1; } else { /* TODO: attempt numeric converson again? */ - debugs(86, 1, "floatcomp with non float or int"); + debugs(86, DBG_IMPORTANT, "floatcomp with non float or int"); return -2; } } else if (a.valuestored == ESI_LITERAL_INT) { @@ -214,7 +214,7 @@ membercompare(stackmember a, stackmember b) return 1; } else { /* TODO: attempt numeric converson again? */ - debugs(86, 1, "intcomp vs non float non int"); + debugs(86, DBG_IMPORTANT, "intcomp vs non float non int"); return -2; } } @@ -252,7 +252,7 @@ evalnegate(stackmember * stack, int *depth, int whereAmI, stackmember * candidat int evalliteral(stackmember * stack, int *depth, int whereAmI, stackmember * candidate) { - debugs(86, 1, "attempt to evaluate a literal"); + debugs(86, DBG_IMPORTANT, "attempt to evaluate a literal"); /* literals can't be evaluated */ return 1; } @@ -260,7 +260,7 @@ evalliteral(stackmember * stack, int *depth, int whereAmI, stackmember * candida int evalexpr(stackmember * stack, int *depth, int whereAmI, stackmember * candidate) { - debugs(86, 1, "attempt to evaluate a sub-expression result"); + debugs(86, DBG_IMPORTANT, "attempt to evaluate a sub-expression result"); /* sub-scpr's can't be evaluated */ return 1; } @@ -411,7 +411,7 @@ evallesseq(stackmember * stack, int *depth, int whereAmI, stackmember * candidat /* Something wrong upstream */ return 1; - /* debugs(86, 1, "?= " << srv.value.integral << " "); */ + /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; @@ -460,7 +460,7 @@ evallessthan(stackmember * stack, int *depth, int whereAmI, stackmember * candid /* Something wrong upstream */ return 1; - /* debugs(86, 1, "?= " << srv.value.integral << " "); */ + /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; @@ -509,7 +509,7 @@ evalmoreeq(stackmember * stack, int *depth, int whereAmI, stackmember * candidat /* Something wrong upstream */ return 1; - /* debugs(86, 1, "?= " << srv.value.integral << " "); */ + /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; @@ -558,7 +558,7 @@ evalmorethan(stackmember * stack, int *depth, int whereAmI, stackmember * candid /* Something wrong upstream */ return 1; - /* debugs(86, 1, "?= " << srv.value.integral << " "); */ + /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; } @@ -607,7 +607,7 @@ evalequals(stackmember * stack, int *depth, int whereAmI, /* Something wrong upstream */ return 1; - /* debugs(86, 1, "?= " << srv.value.integral << " "); */ + /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; } @@ -654,14 +654,14 @@ evalnotequals(stackmember * stack, int *depth, int whereAmI, stackmember * candi /* Something wrong upstream */ return 1; - /* debugs(86, 1, "?= " << srv.value.integral << " "); */ + /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; } int evalstartexpr(stackmember * stack, int *depth, int whereAmI, stackmember * candidate) { - /* debugs(86, 1, "?("); */ + /* debugs(86, DBG_IMPORTANT, "?("); */ if (whereAmI != *depth - 2) /* invalid stack */ @@ -720,7 +720,7 @@ getsymbol(const char *s, char const **endptr) if (s == end || errno) { /* Couldn't convert to float */ - debugs(86, 1, "failed to convert '" << s << "' to float "); + debugs(86, DBG_IMPORTANT, "failed to convert '" << s << "' to float "); *endptr = origs; } else { debugs(86,6, "found " << rv.value.floating << " of length " << end - s); @@ -737,7 +737,7 @@ getsymbol(const char *s, char const **endptr) if (s == end || errno) { /* Couldn't convert to int */ - debugs(86, 1, "failed to convert '" << s << "' to int "); + debugs(86, DBG_IMPORTANT, "failed to convert '" << s << "' to int "); *endptr = origs; } else { debugs(86,6, "found " << rv.value.integral << " of length " << end - s); @@ -770,7 +770,7 @@ getsymbol(const char *s, char const **endptr) ++t; if (!*t) { - debugs(86, 1, "missing end \' in '" << s << "'"); + debugs(86, DBG_IMPORTANT, "missing end \' in '" << s << "'"); *endptr = origs; } else { *endptr = t + 1; @@ -823,7 +823,7 @@ getsymbol(const char *s, char const **endptr) rv.precedence = 5; rv.eval = evalequals; } else { - debugs(86, 1, "invalid expr '" << s << "'"); + debugs(86, DBG_IMPORTANT, "invalid expr '" << s << "'"); *endptr = origs; } } else if ('<' == *s) { @@ -871,7 +871,7 @@ getsymbol(const char *s, char const **endptr) rv.precedence = 1; rv.eval = evalexpr; } else { - debugs(86, 1, "invalid expr '" << s << "'"); + debugs(86, DBG_IMPORTANT, "invalid expr '" << s << "'"); *endptr = origs; } @@ -997,7 +997,7 @@ addmember(stackmember * stack, int *stackdepth, stackmember * candidate) /* cleanup candidate and stack */ dumpstack(stack, *stackdepth); cleanmember(candidate); - debugs(86, 1, "invalid expression"); + debugs(86, DBG_IMPORTANT, "invalid expression"); return 0; } } else { @@ -1031,7 +1031,7 @@ ESIExpression::Evaluate(char const *s) s = end; } else { assert (s == end); - debugs(86, 1, "failed parsing expression"); + debugs(86, DBG_IMPORTANT, "failed parsing expression"); PROF_stop(esiExpressionEval); return 0; } @@ -1045,7 +1045,7 @@ ESIExpression::Evaluate(char const *s) if (stack[stackdepth - 2]. eval(stack, &stackdepth, stackdepth - 2, &rv)) { /* special case - leading operator failed */ - debugs(86, 1, "invalid expression"); + debugs(86, DBG_IMPORTANT, "invalid expression"); PROF_stop(esiExpressionEval); return 0; } diff --git a/src/esi/Include.cc b/src/esi/Include.cc index a850b2c9d4..f7337da13a 100644 --- a/src/esi/Include.cc +++ b/src/esi/Include.cc @@ -184,7 +184,7 @@ esiBufferRecipient (clientStreamNode *node, ClientHttpRequest *http, HttpReply * return; case STREAM_FAILED: - debugs(86, 1, "ESI subrequest failed transfer"); + debugs(86, DBG_IMPORTANT, "ESI subrequest failed transfer"); esiStream->include->includeFail (esiStream); esiStream->finished = 1; httpRequestFree (http); @@ -379,7 +379,7 @@ ESIInclude::ESIInclude (esiTreeParentPtr aParent, int attrcount, char const **at flags.onerrorcontinue = 1; } else { /* ignore mistyped attributes */ - debugs(86, 1, "invalid value for onerror='" << attr[i+1] << "'"); + debugs(86, DBG_IMPORTANT, "invalid value for onerror='" << attr[i+1] << "'"); } } else { /* ignore mistyped attributes. TODO:? error on these for user feedback - config parameter needed @@ -407,7 +407,7 @@ ESIInclude::start() } else { alt = NULL; - debugs(86, 1, "ESIIncludeNew: esi:include with no src attributes"); + debugs(86, DBG_IMPORTANT, "ESIIncludeNew: esi:include with no src attributes"); flags.failed = 1; } diff --git a/src/eui/Eui48.cc b/src/eui/Eui48.cc index 91d86d9487..38e0746acb 100644 --- a/src/eui/Eui48.cc +++ b/src/eui/Eui48.cc @@ -224,14 +224,14 @@ Eui::Eui48::lookup(const Ip::Address &c) ifc.ifc_buf = (char *)ifbuffer; if (ioctl(tmpSocket, SIOCGIFCONF, &ifc) < 0) { - debugs(28, 1, "Attempt to retrieve interface list failed: " << xstrerror()); + debugs(28, DBG_IMPORTANT, "Attempt to retrieve interface list failed: " << xstrerror()); clear(); close(tmpSocket); return false; } if (ifc.ifc_len > (int)sizeof(ifbuffer)) { - debugs(28, 1, "Interface list too long - " << ifc.ifc_len); + debugs(28, DBG_IMPORTANT, "Interface list too long - " << ifc.ifc_len); clear(); close(tmpSocket); return false; @@ -277,7 +277,7 @@ Eui::Eui48::lookup(const Ip::Address &c) else if (ENODEV == errno) (void) 0; else - debugs(28, 1, "ARP query " << ipAddr << " failed: " << ifr->ifr_name << ": " << xstrerror()); + debugs(28, DBG_IMPORTANT, "ARP query " << ipAddr << " failed: " << ifr->ifr_name << ": " << xstrerror()); continue; } diff --git a/src/fd.cc b/src/fd.cc index 0339299aba..4f3fc0780d 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -213,7 +213,7 @@ fd_open(int fd, unsigned int type, const char *desc) F = &fd_table[fd]; if (F->flags.open) { - debugs(51, 1, "WARNING: Closing open FD " << std::setw(4) << fd); + debugs(51, DBG_IMPORTANT, "WARNING: Closing open FD " << std::setw(4) << fd); fd_close(fd); } @@ -308,7 +308,7 @@ fdDumpOpen(void) if (i == fileno(debug_log)) continue; - debugs(51, 1, "Open FD "<< std::left<< std::setw(10) << + debugs(51, DBG_IMPORTANT, "Open FD "<< std::left<< std::setw(10) << (F->bytes_read && F->bytes_written ? "READ/WRITE" : F->bytes_read ? "READING" : F->bytes_written ? "WRITING" : "UNSTARTED") << diff --git a/src/forward.cc b/src/forward.cc index dffa87ae3e..d244da344b 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -177,7 +177,7 @@ void FwdState::completed() { if (flags.forward_completed == 1) { - debugs(17, 1, HERE << "FwdState::completed called on a completed request! Bad!"); + debugs(17, DBG_IMPORTANT, HERE << "FwdState::completed called on a completed request! Bad!"); return; } @@ -652,7 +652,7 @@ FwdState::negotiateSSL(int fd) case SSL_ERROR_SSL: case SSL_ERROR_SYSCALL: ssl_lib_error = ERR_get_error(); - debugs(81, 1, "fwdNegotiateSSL: Error negotiating SSL connection on FD " << fd << + debugs(81, DBG_IMPORTANT, "fwdNegotiateSSL: Error negotiating SSL connection on FD " << fd << ": " << ERR_error_string(ssl_lib_error, NULL) << " (" << ssl_error << "/" << ret << "/" << errno << ")"); @@ -759,7 +759,7 @@ FwdState::initiateSSL() assert(sslContext); if ((ssl = SSL_new(sslContext)) == NULL) { - debugs(83, 1, "fwdInitiateSSL: Error allocating handle: " << ERR_error_string(ERR_get_error(), NULL) ); + debugs(83, DBG_IMPORTANT, "fwdInitiateSSL: Error allocating handle: " << ERR_error_string(ERR_get_error(), NULL) ); ErrorState *anErr = new ErrorState(ERR_SOCKET_FAILURE, HTTP_INTERNAL_SERVER_ERROR, request); // TODO: create Ssl::ErrorDetail with OpenSSL-supplied error code fail(anErr); diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 0bb40a85c9..774d1fcba7 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -353,7 +353,7 @@ fqdncacheParse(fqdncache_entry *f, const char *inbuf) f->flags.negcached = 1; if (inbuf == NULL) { - debugs(35, 1, "fqdncacheParse: Got reply in response to '" << name << "'"); + debugs(35, DBG_IMPORTANT, "fqdncacheParse: Got reply in response to '" << name << "'"); f->error_message = xstrdup("Internal Error"); return -1; } @@ -363,7 +363,7 @@ fqdncacheParse(fqdncache_entry *f, const char *inbuf) token = strtok(buf, w_space); if (NULL == token) { - debugs(35, 1, "fqdncacheParse: Got , expecting '$name' in response to '" << name << "'"); + debugs(35, DBG_IMPORTANT, "fqdncacheParse: Got , expecting '$name' in response to '" << name << "'"); f->error_message = xstrdup("Internal Error"); return -1; } @@ -376,7 +376,7 @@ fqdncacheParse(fqdncache_entry *f, const char *inbuf) } if (0 != strcmp(token, "$name")) { - debugs(35, 1, "fqdncacheParse: Got '" << inbuf << "', expecting '$name' in response to '" << name << "'"); + debugs(35, DBG_IMPORTANT, "fqdncacheParse: Got '" << inbuf << "', expecting '$name' in response to '" << name << "'"); f->error_message = xstrdup("Internal Error"); return -1; } @@ -384,7 +384,7 @@ fqdncacheParse(fqdncache_entry *f, const char *inbuf) token = strtok(NULL, w_space); if (NULL == token) { - debugs(35, 1, "fqdncacheParse: Got '" << inbuf << "', expecting TTL in response to '" << name << "'"); + debugs(35, DBG_IMPORTANT, "fqdncacheParse: Got '" << inbuf << "', expecting TTL in response to '" << name << "'"); f->error_message = xstrdup("Internal Error"); return -1; } @@ -394,7 +394,7 @@ fqdncacheParse(fqdncache_entry *f, const char *inbuf) token = strtok(NULL, w_space); if (NULL == token) { - debugs(35, 1, "fqdncacheParse: Got '" << inbuf << "', expecting hostname in response to '" << name << "'"); + debugs(35, DBG_IMPORTANT, "fqdncacheParse: Got '" << inbuf << "', expecting hostname in response to '" << name << "'"); f->error_message = xstrdup("Internal Error"); return -1; } @@ -468,7 +468,7 @@ fqdncacheParse(fqdncache_entry *f, const rfc1035_rr * answers, int nr, const cha } if (f->name_count == 0) { - debugs(35, 1, "fqdncacheParse: No PTR record for '" << name << "'"); + debugs(35, DBG_IMPORTANT, "fqdncacheParse: No PTR record for '" << name << "'"); return 0; } @@ -846,7 +846,7 @@ fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames) if (1 == fce->flags.fromhosts) { fqdncacheUnlockEntry(fce); } else if (fce->locks > 0) { - debugs(35, 1, "fqdncacheAddEntryFromHosts: can't add static entry for locked address '" << addr << "'"); + debugs(35, DBG_IMPORTANT, "fqdncacheAddEntryFromHosts: can't add static entry for locked address '" << addr << "'"); return; } else { fqdncacheRelease(fce); diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 1e51d449ac..663c3dd61a 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -123,7 +123,7 @@ CossSwapDir::openLog() swaplog_fd = file_open(logPath, O_WRONLY | O_CREAT | O_BINARY); if (swaplog_fd < 0) { - debugs(47, 1, "" << logPath << ": " << xstrerror()); + debugs(47, DBG_IMPORTANT, "" << logPath << ": " << xstrerror()); fatal("storeCossDirOpenSwapLog: Failed to open swap log."); } @@ -147,7 +147,7 @@ void CossSwapDir::ioCompletedNotification() { if (theFile->error()) { - debugs(47, 1, "" << path << ": " << xstrerror()); + debugs(47, DBG_IMPORTANT, "" << path << ": " << xstrerror()); fatal("storeCossDirInit: Failed to open a COSS file."); } } @@ -178,9 +178,9 @@ CossSwapDir::readCompleted(const char *buf, int len, int errflag, RefCount 0) { errno = errflag; - debugs(79, 1, "storeCossReadDone: error: " << xstrerror()); + debugs(79, DBG_IMPORTANT, "storeCossReadDone: error: " << xstrerror()); } else { - debugs(79, 1, "storeCossReadDone: got failure (" << errflag << ")"); + debugs(79, DBG_IMPORTANT, "storeCossReadDone: got failure (" << errflag << ")"); } rlen = -1; @@ -218,8 +218,8 @@ CossSwapDir::writeCompleted(int errflag, size_t len, RefCount writ if (errflag) { ++ StoreFScoss::GetInstance().stats.stripe_write.fail; - debugs(79, 1, "storeCossWriteMemBufDone: got failure (" << errflag << ")"); - debugs(79, 1, "size=" << cossWrite->membuf->diskend - cossWrite->membuf->diskstart); + debugs(79, DBG_IMPORTANT, "storeCossWriteMemBufDone: got failure (" << errflag << ")"); + debugs(79, DBG_IMPORTANT, "size=" << cossWrite->membuf->diskend - cossWrite->membuf->diskstart); } else { ++ StoreFScoss::GetInstance().stats.stripe_write.success; } @@ -387,7 +387,7 @@ storeCossRebuildFromSwapLog(void *data) for (int aCount = 0; aCount < rb->speed; ++aCount) { if (fread(&s, ss, 1, rb->log) != 1) { - debugs(47, 1, "Done reading " << rb->sd->path << " swaplog (" << rb->n_read << " entries)"); + debugs(47, DBG_IMPORTANT, "Done reading " << rb->sd->path << " swaplog (" << rb->n_read << " entries)"); fclose(rb->log); rb->log = NULL; storeCossRebuildComplete(rb); @@ -439,7 +439,7 @@ storeCossRebuildFromSwapLog(void *data) if (0.0 == x - (double) (int) x) - debugs(47, 1, "WARNING: " << rb->counts.bad_log_op << " invalid swap log entries found"); + debugs(47, DBG_IMPORTANT, "WARNING: " << rb->counts.bad_log_op << " invalid swap log entries found"); ++ rb->counts.invalid; @@ -555,7 +555,7 @@ storeCossDirRebuild(CossSwapDir * sd) * we'll use storeCossRebuildFromSwapLog(). */ fp = storeCossDirOpenTmpSwapLog(sd, &clean, &zero); - debugs(47, 1, "Rebuilding COSS storage in " << sd->path << " (" << (clean ? "CLEAN" : "DIRTY") << ")"); + debugs(47, DBG_IMPORTANT, "Rebuilding COSS storage in " << sd->path << " (" << (clean ? "CLEAN" : "DIRTY") << ")"); rb->log = fp; ++ StoreController::store_dirs_rebuilding; @@ -598,7 +598,7 @@ storeCossDirCloseTmpSwapLog(CossSwapDir * sd) anfd = file_open(swaplog_path, O_WRONLY | O_CREAT | O_BINARY); if (anfd < 0) { - debugs(50, 1, "" << swaplog_path << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "" << swaplog_path << ": " << xstrerror()); fatal("storeCossDirCloseTmpSwapLog: Failed to open swap log."); } @@ -622,7 +622,7 @@ storeCossDirOpenTmpSwapLog(CossSwapDir * sd, int *clean_flag, int *zero_flag) int anfd; if (::stat(swaplog_path, &log_sb) < 0) { - debugs(50, 1, "Cache COSS Dir #" << sd->index << ": No log file"); + debugs(50, DBG_IMPORTANT, "Cache COSS Dir #" << sd->index << ": No log file"); safe_free(swaplog_path); safe_free(clean_path); safe_free(new_path); @@ -639,7 +639,7 @@ storeCossDirOpenTmpSwapLog(CossSwapDir * sd, int *clean_flag, int *zero_flag) anfd = file_open(new_path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY); if (anfd < 0) { - debugs(50, 1, "" << new_path << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "" << new_path << ": " << xstrerror()); fatal("storeDirOpenTmpSwapLog: Failed to open swap log."); } @@ -1045,9 +1045,9 @@ CossSwapDir::reconfigure() const uint64_t size = static_cast(i) << 20; // MBytes to Bytes if (size == maxSize()) - debugs(3, 1, "Cache COSS dir '" << path << "' size remains unchanged at " << i << " MB"); + debugs(3, DBG_IMPORTANT, "Cache COSS dir '" << path << "' size remains unchanged at " << i << " MB"); else { - debugs(3, 1, "Cache COSS dir '" << path << "' size changed to " << i << " MB"); + debugs(3, DBG_IMPORTANT, "Cache COSS dir '" << path << "' size changed to " << i << " MB"); max_size = size; } diff --git a/src/fs/coss/store_io_coss.cc b/src/fs/coss/store_io_coss.cc index 458f55d69a..3feb544b6d 100644 --- a/src/fs/coss/store_io_coss.cc +++ b/src/fs/coss/store_io_coss.cc @@ -510,7 +510,7 @@ CossSwapDir::sync() t = (CossMemBuf *)m->data; if (t->flags.writing) { - debugs(79, 1, "WARNING: sleeping for 5 seconds in storeCossSync()"); + debugs(79, DBG_IMPORTANT, "WARNING: sleeping for 5 seconds in storeCossSync()"); sleep(5); /* XXX EEEWWW! */ } diff --git a/src/fs/ufs/store_io_ufs.cc b/src/fs/ufs/store_io_ufs.cc index a9d21c9aa4..cec51e4b3e 100644 --- a/src/fs/ufs/store_io_ufs.cc +++ b/src/fs/ufs/store_io_ufs.cc @@ -238,8 +238,8 @@ UFSStoreState::write(char const *buf, size_t size, off_t aOffset, FREE * free_fu std::setfill('0') << std::hex << std::uppercase << std::setw(8) << swap_filen); if (theFile->error()) { - debugs(79,1,HERE << "avoid write on theFile with error"); - debugs(79,1,HERE << "calling free_func for " << (void*) buf); + debugs(79, DBG_IMPORTANT,HERE << "avoid write on theFile with error"); + debugs(79, DBG_IMPORTANT,HERE << "calling free_func for " << (void*) buf); free_func((void*)buf); return; } @@ -270,7 +270,7 @@ UFSStoreState::doWrite() } if (theFile->error()) { - debugs(79,1,HERE << "avoid write on theFile with error"); + debugs(79, DBG_IMPORTANT,HERE << "avoid write on theFile with error"); debugs(79,3,HERE << "calling free_func for " << (void*) q->buf); /* * DPW 2006-05-24 diff --git a/src/gopher.cc b/src/gopher.cc index 598195adb8..84ef54dbe4 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -454,7 +454,7 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) llen = left; } if (gopherState->len + llen >= TEMP_BUF_SIZE) { - debugs(10, 1, "GopherHTML: Buffer overflow. Lost some data on URL: " << entry->url() ); + debugs(10, DBG_IMPORTANT, "GopherHTML: Buffer overflow. Lost some data on URL: " << entry->url() ); llen = TEMP_BUF_SIZE - gopherState->len - 1; } if (!lpos) { @@ -796,7 +796,7 @@ gopherReadReply(const Comm::ConnectionPointer &conn, char *buf, size_t len, comm } if (flag != COMM_OK) { - debugs(50, 1, "gopherReadReply: error reading: " << xstrerror()); + debugs(50, DBG_IMPORTANT, "gopherReadReply: error reading: " << xstrerror()); if (ignoreErrno(xerrno)) { AsyncCall::Pointer call = commCbCall(5,4, "gopherReadReply", diff --git a/src/helper.cc b/src/helper.cc index f554ff6478..750b8f3aaf 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -172,10 +172,10 @@ helperOpenServers(helper * hlp) /* figure out how many new child are actually needed. */ int need_new = hlp->childs.needNew(); - debugs(84, 1, "helperOpenServers: Starting " << need_new << "/" << hlp->childs.n_max << " '" << shortname << "' processes"); + debugs(84, DBG_IMPORTANT, "helperOpenServers: Starting " << need_new << "/" << hlp->childs.n_max << " '" << shortname << "' processes"); if (need_new < 1) { - debugs(84, 1, "helperOpenServers: No '" << shortname << "' processes needed."); + debugs(84, DBG_IMPORTANT, "helperOpenServers: No '" << shortname << "' processes needed."); } procname = (char *)xmalloc(strlen(shortname) + 3); @@ -208,7 +208,7 @@ helperOpenServers(helper * hlp) &hIpc); if (pid < 0) { - debugs(84, 1, "WARNING: Cannot run '" << progname << "' process."); + debugs(84, DBG_IMPORTANT, "WARNING: Cannot run '" << progname << "' process."); continue; } @@ -290,10 +290,10 @@ helperStatefulOpenServers(statefulhelper * hlp) /* figure out haw mant new helpers are needed. */ int need_new = hlp->childs.needNew(); - debugs(84, 1, "helperOpenServers: Starting " << need_new << "/" << hlp->childs.n_max << " '" << shortname << "' processes"); + debugs(84, DBG_IMPORTANT, "helperOpenServers: Starting " << need_new << "/" << hlp->childs.n_max << " '" << shortname << "' processes"); if (need_new < 1) { - debugs(84, 1, "helperStatefulOpenServers: No '" << shortname << "' processes needed."); + debugs(84, DBG_IMPORTANT, "helperStatefulOpenServers: No '" << shortname << "' processes needed."); } char *procname = (char *)xmalloc(strlen(shortname) + 3); @@ -328,7 +328,7 @@ helperStatefulOpenServers(statefulhelper * hlp) &hIpc); if (pid < 0) { - debugs(84, 1, "WARNING: Cannot run '" << progname << "' process."); + debugs(84, DBG_IMPORTANT, "WARNING: Cannot run '" << progname << "' process."); continue; } @@ -725,12 +725,12 @@ helperServerFree(helper_server *srv) debugs(84, DBG_CRITICAL, "WARNING: " << hlp->id_name << " #" << srv->index + 1 << " exited"); if (hlp->childs.needNew() > 0) { - debugs(80, 1, "Too few " << hlp->id_name << " processes are running (need " << hlp->childs.needNew() << "/" << hlp->childs.n_max << ")"); + debugs(80, DBG_IMPORTANT, "Too few " << hlp->id_name << " processes are running (need " << hlp->childs.needNew() << "/" << hlp->childs.n_max << ")"); if (hlp->childs.n_active < hlp->childs.n_startup && hlp->last_restart > squid_curtime - 30) fatalf("The %s helpers are crashing too rapidly, need help!\n", hlp->id_name); - debugs(80, 1, "Starting new helpers"); + debugs(80, DBG_IMPORTANT, "Starting new helpers"); helperOpenServers(hlp); } } @@ -786,12 +786,12 @@ helperStatefulServerFree(helper_stateful_server *srv) debugs(84, 0, "WARNING: " << hlp->id_name << " #" << srv->index + 1 << " exited"); if (hlp->childs.needNew() > 0) { - debugs(80, 1, "Too few " << hlp->id_name << " processes are running (need " << hlp->childs.needNew() << "/" << hlp->childs.n_max << ")"); + debugs(80, DBG_IMPORTANT, "Too few " << hlp->id_name << " processes are running (need " << hlp->childs.needNew() << "/" << hlp->childs.n_max << ")"); if (hlp->childs.n_active < hlp->childs.n_startup && hlp->last_restart > squid_curtime - 30) fatalf("The %s helpers are crashing too rapidly, need help!\n", hlp->id_name); - debugs(80, 1, "Starting new helpers"); + debugs(80, DBG_IMPORTANT, "Starting new helpers"); helperStatefulOpenServers(hlp); } } @@ -845,7 +845,7 @@ static void helperReturnBuffer(int request_number, helper_server * srv, helper * helperRequestFree(r); } else { - debugs(84, 1, "helperHandleRead: unexpected reply on channel " << + debugs(84, DBG_IMPORTANT, "helperHandleRead: unexpected reply on channel " << request_number << " from " << hlp->id_name << " #" << srv->index + 1 << " '" << srv->rbuf << "'"); } @@ -890,7 +890,7 @@ helperHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t len, com if (!srv->stats.pending) { /* someone spoke without being spoken to */ - debugs(84, 1, "helperHandleRead: unexpected read from " << + debugs(84, DBG_IMPORTANT, "helperHandleRead: unexpected read from " << hlp->id_name << " #" << srv->index + 1 << ", " << (int)len << " bytes '" << srv->rbuf << "'"); @@ -980,7 +980,7 @@ helperStatefulHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t if (r == NULL) { /* someone spoke without being spoken to */ - debugs(84, 1, "helperStatefulHandleRead: unexpected read from " << + debugs(84, DBG_IMPORTANT, "helperStatefulHandleRead: unexpected read from " << hlp->id_name << " #" << srv->index + 1 << ", " << (int)len << " bytes '" << srv->rbuf << "'"); @@ -1000,7 +1000,7 @@ helperStatefulHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t if (r && cbdataReferenceValid(r->data)) { r->callback(r->data, srv, srv->rbuf); } else { - debugs(84, 1, "StatefulHandleRead: no callback data registered"); + debugs(84, DBG_IMPORTANT, "StatefulHandleRead: no callback data registered"); called = 0; } @@ -1262,7 +1262,7 @@ helperDispatch(helper_server * srv, helper_request * r) unsigned int slot; if (!cbdataReferenceValid(r->data)) { - debugs(84, 1, "helperDispatch: invalid callback data"); + debugs(84, DBG_IMPORTANT, "helperDispatch: invalid callback data"); helperRequestFree(r); return; } @@ -1317,7 +1317,7 @@ helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r statefulhelper *hlp = srv->parent; if (!cbdataReferenceValid(r->data)) { - debugs(84, 1, "helperStatefulDispatch: invalid callback data"); + debugs(84, DBG_IMPORTANT, "helperStatefulDispatch: invalid callback data"); helperStatefulRequestFree(r); helperStatefulReleaseServer(srv); return; diff --git a/src/http.cc b/src/http.cc index ef267d1395..c1e3619d14 100644 --- a/src/http.cc +++ b/src/http.cc @@ -609,7 +609,7 @@ HttpStateData::keepaliveAccounting(HttpReply *reply) if (Config.onoff.detect_broken_server_pconns && reply->bodySize(request->method) == -1 && !flags.chunked) { - debugs(11, 1, "keepaliveAccounting: Impossible keep-alive header from '" << entry->url() << "'" ); + debugs(11, DBG_IMPORTANT, "keepaliveAccounting: Impossible keep-alive header from '" << entry->url() << "'" ); // debugs(11, 2, "GOT HTTP REPLY HDR:\n---------\n" << readBuf->content() << "\n----------" ); flags.keepalive_broken = 1; } @@ -1682,7 +1682,7 @@ HttpStateData::httpBuildRequestHeader(HttpRequest * request, static int warnedCount = 0; if (warnedCount++ < 100) { const char *url = entry ? entry->url() : urlCanonical(request); - debugs(11, 1, "Warning: likely forwarding loop with " << url); + debugs(11, DBG_IMPORTANT, "Warning: likely forwarding loop with " << url); } } @@ -2257,7 +2257,7 @@ HttpStateData::handleMoreRequestBodyAvailable() // XXX: we should check this condition in other callbacks then! // TODO: Check whether this can actually happen: We should unsubscribe // as a body consumer when the above condition(s) are detected. - debugs(11, 1, HERE << "Transaction aborted while reading HTTP body"); + debugs(11, DBG_IMPORTANT, HERE << "Transaction aborted while reading HTTP body"); return; } @@ -2268,7 +2268,7 @@ HttpStateData::handleMoreRequestBodyAvailable() if (flags.headers_parsed && !flags.abuse_detected) { flags.abuse_detected = 1; - debugs(11, 1, "http handleMoreRequestBodyAvailable: Likely proxy abuse detected '" << request->client_addr << "' -> '" << entry->url() << "'" ); + debugs(11, DBG_IMPORTANT, "http handleMoreRequestBodyAvailable: Likely proxy abuse detected '" << request->client_addr << "' -> '" << entry->url() << "'" ); if (virginReply()->sline.status == HTTP_INVALID_HEADER) { serverConnection->close(); diff --git a/src/icmp/Icmp4.cc b/src/icmp/Icmp4.cc index 2aa7a57a09..30e87fd552 100644 --- a/src/icmp/Icmp4.cc +++ b/src/icmp/Icmp4.cc @@ -84,7 +84,7 @@ Icmp4::Open(void) } icmp_ident = getpid() & 0xffff; - debugs(42, 1, "pinger: ICMP socket opened."); + debugs(42, DBG_IMPORTANT, "pinger: ICMP socket opened."); return icmp_sock; } @@ -152,7 +152,7 @@ Icmp4::SendEcho(Ip::Address &to, int opcode, const char *payload, int len) S->ai_addrlen); if (x < 0) { - debugs(42, 1, HERE << "Error sending to ICMP packet to " << to << ". ERR: " << xstrerror()); + debugs(42, DBG_IMPORTANT, HERE << "Error sending to ICMP packet to " << to << ". ERR: " << xstrerror()); } Log(to, ' ', NULL, 0, 0); diff --git a/src/icmp/Icmp6.cc b/src/icmp/Icmp6.cc index 206df2c896..69434fbcdc 100644 --- a/src/icmp/Icmp6.cc +++ b/src/icmp/Icmp6.cc @@ -124,7 +124,7 @@ Icmp6::Open(void) } icmp_ident = getpid() & 0xffff; - debugs(42, 1, "pinger: ICMPv6 socket opened"); + debugs(42, DBG_IMPORTANT, "pinger: ICMPv6 socket opened"); return icmp_sock; } @@ -197,7 +197,7 @@ Icmp6::SendEcho(Ip::Address &to, int opcode, const char *payload, int len) S->ai_addrlen); if (x < 0) { - debugs(42, 1, HERE << "Error sending to ICMPv6 packet to " << to << ". ERR: " << xstrerror()); + debugs(42, DBG_IMPORTANT, HERE << "Error sending to ICMPv6 packet to " << to << ". ERR: " << xstrerror()); } debugs(42,9, HERE << "x=" << x); diff --git a/src/icmp/IcmpPinger.cc b/src/icmp/IcmpPinger.cc index 6d1c66c721..49a56e2c63 100644 --- a/src/icmp/IcmpPinger.cc +++ b/src/icmp/IcmpPinger.cc @@ -142,7 +142,7 @@ IcmpPinger::Open(void) } getCurrentTime(); - debugs(42, 1, "pinger: Squid socket opened"); + debugs(42, DBG_IMPORTANT, "pinger: Squid socket opened"); /* windows uses a socket stream as a dual-direction channel */ socket_to_squid = icmp_sock; @@ -185,7 +185,7 @@ IcmpPinger::Recv(void) n = recv(socket_from_squid, &pecho, sizeof(pecho), 0); if (n < 0) { - debugs(42, 1, "Pinger exiting."); + debugs(42, DBG_IMPORTANT, "Pinger exiting."); Close(); exit(1); } @@ -223,7 +223,7 @@ IcmpPinger::Recv(void) pecho.payload, pecho.psize); } else { - debugs(42, 1, HERE << " IP has unknown Type. " << pecho.to ); + debugs(42, DBG_IMPORTANT, HERE << " IP has unknown Type. " << pecho.to ); } } diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc index 46f9e5e800..6337c1a898 100644 --- a/src/icmp/IcmpSquid.cc +++ b/src/icmp/IcmpSquid.cc @@ -115,7 +115,7 @@ IcmpSquid::SendEcho(Ip::Address &to, int opcode, const char *payload, int len) x = comm_udp_send(icmp_sock, (char *)&pecho, slen, 0); if (x < 0) { - debugs(37, 1, HERE << "send: " << xstrerror()); + debugs(37, DBG_IMPORTANT, HERE << "send: " << xstrerror()); /** \li If the send results in ECONNREFUSED or EPIPE errors from helper, will cleanly shutdown the module. */ /** \todo This should try restarting the helper a few times?? before giving up? */ @@ -125,7 +125,7 @@ IcmpSquid::SendEcho(Ip::Address &to, int opcode, const char *payload, int len) } /** All other send errors are ignored. */ } else if (x != slen) { - debugs(37, 1, HERE << "Wrote " << x << " of " << slen << " bytes"); + debugs(37, DBG_IMPORTANT, HERE << "Wrote " << x << " of " << slen << " bytes"); } } @@ -153,7 +153,7 @@ IcmpSquid::Recv() 0); if (n < 0 && EAGAIN != errno) { - debugs(37, 1, HERE << "recv: " << xstrerror()); + debugs(37, DBG_IMPORTANT, HERE << "recv: " << xstrerror()); if (errno == ECONNREFUSED) Close(); @@ -190,7 +190,7 @@ IcmpSquid::Recv() break; default: - debugs(37, 1, HERE << "Bad opcode: " << preply.opcode << " from " << F); + debugs(37, DBG_IMPORTANT, HERE << "Bad opcode: " << preply.opcode << " from " << F); break; } } @@ -252,7 +252,7 @@ IcmpSquid::Open(void) commUnsetFdTimeout(icmp_sock); - debugs(37, 1, HERE << "Pinger socket opened on FD " << icmp_sock); + debugs(37, DBG_IMPORTANT, HERE << "Pinger socket opened on FD " << icmp_sock); /* Tests the pinger immediately using localhost */ if (Ip::EnableIpv6) @@ -279,7 +279,7 @@ IcmpSquid::Close(void) if (icmp_sock < 0) return; - debugs(37, 1, HERE << "Closing Pinger socket on FD " << icmp_sock); + debugs(37, DBG_IMPORTANT, HERE << "Closing Pinger socket on FD " << icmp_sock); #if _SQUID_MSWIN_ diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc index 6e88bddfca..d27d0ee282 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -307,7 +307,7 @@ netdbSendPing(const ipcache_addrs *ia, const DnsLookupDetails &, void *data) x = (net_db_name *) hash_lookup(host_table, hostname); if (x == NULL) { - debugs(38, 1, "netdbSendPing: net_db_name list bug: " << hostname << " not found"); + debugs(38, DBG_IMPORTANT, "netdbSendPing: net_db_name list bug: " << hostname << " not found"); xfree(hostname); return; } @@ -482,7 +482,7 @@ netdbSaveState(void *foo) lf = logfileOpen(Config.netdbFilename, 4096, 0); if (NULL == lf) { - debugs(50, 1, "netdbSaveState: " << Config.netdbFilename << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "netdbSaveState: " << Config.netdbFilename << ": " << xstrerror()); return; } @@ -514,7 +514,7 @@ netdbSaveState(void *foo) logfileClose(lf); getCurrentTime(); - debugs(38, 1, "NETDB state saved; " << + debugs(38, DBG_IMPORTANT, "NETDB state saved; " << count << " entries, " << tvSubMsec(start, current_time) << " msec" ); eventAddIsh("netdbSaveState", netdbSaveState, NULL, 3600.0, 1); @@ -637,7 +637,7 @@ netdbReloadState(void) xfree(buf); getCurrentTime(); - debugs(38, 1, "NETDB state reloaded; " << + debugs(38, DBG_IMPORTANT, "NETDB state reloaded; " << count << " entries, " << tvSubMsec(start, current_time) << " msec" ); } @@ -799,7 +799,7 @@ netdbExchangeHandleReply(void *data, StoreIOBuffer receivedData) break; default: - debugs(38, 1, "netdbExchangeHandleReply: corrupt data, aborting"); + debugs(38, DBG_IMPORTANT, "netdbExchangeHandleReply: corrupt data, aborting"); netdbExchangeDone(ex); return; } @@ -1318,7 +1318,7 @@ netdbExchangeStart(void *data) ex->r = HttpRequest::CreateFromUrl(uri); if (NULL == ex->r) { - debugs(38, 1, "netdbExchangeStart: Bad URI " << uri); + debugs(38, DBG_IMPORTANT, "netdbExchangeStart: Bad URI " << uri); return; } diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 05d7a1c7cf..a01b5d335f 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -621,7 +621,7 @@ icpHandleUdp(int sock, void *data) if (errno != ECONNREFUSED && errno != EHOSTUNREACH) #endif - debugs(50, 1, "icpHandleUdp: FD " << sock << " recvfrom: " << xstrerror()); + debugs(50, DBG_IMPORTANT, "icpHandleUdp: FD " << sock << " recvfrom: " << xstrerror()); break; } @@ -652,7 +652,7 @@ icpHandleUdp(int sock, void *data) else if (icp_version == ICP_VERSION_3) icpHandleIcpV3(sock, from, buf, len); else - debugs(12, 1, "WARNING: Unused ICP version " << icp_version << + debugs(12, DBG_IMPORTANT, "WARNING: Unused ICP version " << icp_version << " received from " << from); } } diff --git a/src/ip/Address.cc b/src/ip/Address.cc index 5c0946124a..29d3d1fa8d 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -1032,7 +1032,7 @@ Ip::Address::GetInAddr(struct in_addr &buf) const // default: // non-compatible IPv6 Pure Address - debugs(14,1, HERE << "Ip::Address::GetInAddr : Cannot convert non-IPv4 to IPv4. IPA=" << *this); + debugs(14, DBG_IMPORTANT, HERE << "Ip::Address::GetInAddr : Cannot convert non-IPv4 to IPv4. IPA=" << *this); memset(&buf,0xFFFFFFFF,sizeof(struct in_addr)); assert(false); return false; diff --git a/src/ipc.cc b/src/ipc.cc index 9c6ec52285..10c0419cce 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -231,7 +231,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name if (type == IPC_TCP_SOCKET) { if (listen(crfd, 1) < 0) { - debugs(54, 1, "ipcCreate: listen FD " << crfd << ": " << xstrerror()); + debugs(54, DBG_IMPORTANT, "ipcCreate: listen FD " << crfd << ": " << xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } @@ -242,7 +242,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name logsFlush(); if ((pid = fork()) < 0) { - debugs(54, 1, "ipcCreate: fork: " << xstrerror()); + debugs(54, DBG_IMPORTANT, "ipcCreate: fork: " << xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } diff --git a/src/ipc/Coordinator.cc b/src/ipc/Coordinator.cc index 6f1a10a31f..2eec25b43f 100644 --- a/src/ipc/Coordinator.cc +++ b/src/ipc/Coordinator.cc @@ -124,7 +124,7 @@ void Ipc::Coordinator::receive(const TypedMsgHdr& message) #endif default: - debugs(54, 1, HERE << "Unhandled message type: " << message.type()); + debugs(54, DBG_IMPORTANT, HERE << "Unhandled message type: " << message.type()); break; } } diff --git a/src/ipc/FdNotes.cc b/src/ipc/FdNotes.cc index e3c25d6685..603adf1d22 100644 --- a/src/ipc/FdNotes.cc +++ b/src/ipc/FdNotes.cc @@ -28,6 +28,6 @@ Ipc::FdNote(int fdNoteId) if (fdnNone < fdNoteId && fdNoteId < fdnEnd) return FdNotes[fdNoteId]; - debugs(54, 1, HERE << "salvaged bug: wrong fd_note ID: " << fdNoteId); + debugs(54, DBG_IMPORTANT, HERE << "salvaged bug: wrong fd_note ID: " << fdNoteId); return FdNotes[fdnNone]; } diff --git a/src/ipc/Strand.cc b/src/ipc/Strand.cc index 53a690c1b4..5576eb14a0 100644 --- a/src/ipc/Strand.cc +++ b/src/ipc/Strand.cc @@ -106,7 +106,7 @@ void Ipc::Strand::receive(const TypedMsgHdr &message) #endif default: - debugs(54, 1, HERE << "Unhandled message type: " << message.type()); + debugs(54, DBG_IMPORTANT, HERE << "Unhandled message type: " << message.type()); break; } } diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc index e67322d49a..6148d7d742 100644 --- a/src/ipc_win32.cc +++ b/src/ipc_win32.cc @@ -223,7 +223,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name if (type == IPC_TCP_SOCKET) { if (listen(crfd, 1) < 0) { - debugs(54, 1, "ipcCreate: listen FD " << crfd << ": " << xstrerror()); + debugs(54, DBG_IMPORTANT, "ipcCreate: listen FD " << crfd << ": " << xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } @@ -250,7 +250,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name thread = _beginthreadex(NULL, 0, ipc_thread_1, ¶ms, 0, NULL); if (thread == 0) { - debugs(54, 1, "ipcCreate: _beginthread: " << xstrerror()); + debugs(54, DBG_IMPORTANT, "ipcCreate: _beginthread: " << xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } diff --git a/src/ipcache.cc b/src/ipcache.cc index a782c0bbe0..49f7466f5a 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -371,7 +371,7 @@ ipcacheParse(ipcache_entry *i, const char *inbuf) i->addrs.count = 0; if (inbuf == NULL) { - debugs(14, 1, "ipcacheParse: Got reply"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: Got reply"); i->error_message = xstrdup("Internal Error"); return -1; } @@ -381,7 +381,7 @@ ipcacheParse(ipcache_entry *i, const char *inbuf) token = strtok(buf, w_space); if (NULL == token) { - debugs(14, 1, "ipcacheParse: expecting result, got '" << inbuf << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: expecting result, got '" << inbuf << "'"); i->error_message = xstrdup("Internal Error"); return -1; @@ -395,7 +395,7 @@ ipcacheParse(ipcache_entry *i, const char *inbuf) } if (0 != strcmp(token, "$addr")) { - debugs(14, 1, "ipcacheParse: expecting '$addr', got '" << inbuf << "' in response to '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: expecting '$addr', got '" << inbuf << "' in response to '" << name << "'"); i->error_message = xstrdup("Internal Error"); return -1; @@ -404,7 +404,7 @@ ipcacheParse(ipcache_entry *i, const char *inbuf) token = strtok(NULL, w_space); if (NULL == token) { - debugs(14, 1, "ipcacheParse: expecting TTL, got '" << inbuf << "' in response to '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: expecting TTL, got '" << inbuf << "' in response to '" << name << "'"); i->error_message = xstrdup("Internal Error"); return -1; @@ -432,14 +432,14 @@ ipcacheParse(ipcache_entry *i, const char *inbuf) if ( i->addrs.in_addrs[j] = A[k] ) ++j; else - debugs(14, 1, "ipcacheParse: Invalid IP address '" << A[k] << "' in response to '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: Invalid IP address '" << A[k] << "' in response to '" << name << "'"); } i->addrs.count = (unsigned char) j; } if (i->addrs.count <= 0) { - debugs(14, 1, "ipcacheParse: No addresses in response to '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: No addresses in response to '" << name << "'"); return -1; } @@ -496,7 +496,7 @@ ipcacheParse(ipcache_entry *i, const rfc1035_rr * answers, int nr, const char *e if (Ip::EnableIpv6 && answers[k].type == RFC1035_TYPE_AAAA) { if (answers[k].rdlength != sizeof(struct in6_addr)) { - debugs(14, 1, "ipcacheParse: Invalid IPv6 address in response to '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: Invalid IPv6 address in response to '" << name << "'"); continue; } ++na; @@ -506,7 +506,7 @@ ipcacheParse(ipcache_entry *i, const rfc1035_rr * answers, int nr, const char *e if (answers[k].type == RFC1035_TYPE_A) { if (answers[k].rdlength != sizeof(struct in_addr)) { - debugs(14, 1, "ipcacheParse: Invalid IPv4 address in response to '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: Invalid IPv4 address in response to '" << name << "'"); continue; } ++na; @@ -525,7 +525,7 @@ ipcacheParse(ipcache_entry *i, const rfc1035_rr * answers, int nr, const char *e debugs(14, 9, HERE << "Unknown RR type received: type=" << answers[k].type << " starting at " << &(answers[k]) ); } if (na == 0) { - debugs(14, 1, "ipcacheParse: No Address records in response to '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheParse: No Address records in response to '" << name << "'"); i->error_message = xstrdup("No Address records"); if (cname_found) ++IpcacheStats.cname_only; @@ -983,7 +983,7 @@ static void ipcacheUnlockEntry(ipcache_entry * i) { if (i->locks < 1) { - debugs(14, 1, "WARNING: ipcacheEntry unlocked with no lock! locks=" << i->locks); + debugs(14, DBG_IMPORTANT, "WARNING: ipcacheEntry unlocked with no lock! locks=" << i->locks); return; } @@ -1188,7 +1188,7 @@ ipcacheAddEntryFromHosts(const char *name, const char *ipaddr) if (strchr(ipaddr, ':') && strspn(ipaddr, "0123456789abcdefABCDEF:") == strlen(ipaddr)) { debugs(14, 3, "ipcacheAddEntryFromHosts: Skipping IPv6 address '" << ipaddr << "'"); } else { - debugs(14, 1, "ipcacheAddEntryFromHosts: Bad IP address '" << ipaddr << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheAddEntryFromHosts: Bad IP address '" << ipaddr << "'"); } return 1; @@ -1198,7 +1198,7 @@ ipcacheAddEntryFromHosts(const char *name, const char *ipaddr) if (1 == i->flags.fromhosts) { ipcacheUnlockEntry(i); } else if (i->locks > 0) { - debugs(14, 1, "ipcacheAddEntryFromHosts: can't add static entry for locked name '" << name << "'"); + debugs(14, DBG_IMPORTANT, "ipcacheAddEntryFromHosts: can't add static entry for locked name '" << name << "'"); return 1; } else { ipcacheRelease(i); diff --git a/src/log/File.cc b/src/log/File.cc index 602334efab..0b71f093f6 100644 --- a/src/log/File.cc +++ b/src/log/File.cc @@ -49,7 +49,7 @@ logfileOpen(const char *path, size_t bufsz, int fatal_flag) int ret; const char *patharg; - debugs(50, 1, "Logfile: opening log " << path); + debugs(50, DBG_IMPORTANT, "Logfile: opening log " << path); CBDATA_INIT_TYPE(Logfile); Logfile *lf = cbdataAlloc(Logfile); @@ -82,7 +82,7 @@ logfileOpen(const char *path, size_t bufsz, int fatal_flag) if (fatal_flag) fatalf("logfileOpen: %s: couldn't open!\n", path); else - debugs(50, 1, "logfileOpen: " << path << ": couldn't open!"); + debugs(50, DBG_IMPORTANT, "logfileOpen: " << path << ": couldn't open!"); lf->f_close(lf); cbdataFree(lf); return NULL; @@ -100,7 +100,7 @@ logfileOpen(const char *path, size_t bufsz, int fatal_flag) void logfileClose(Logfile * lf) { - debugs(50, 1, "Logfile: closing log " << lf->path); + debugs(50, DBG_IMPORTANT, "Logfile: closing log " << lf->path); lf->f_flush(lf); lf->f_close(lf); cbdataFree(lf); @@ -109,7 +109,7 @@ logfileClose(Logfile * lf) void logfileRotate(Logfile * lf) { - debugs(50, 1, "logfileRotate: " << lf->path); + debugs(50, DBG_IMPORTANT, "logfileRotate: " << lf->path); lf->f_rotate(lf); } diff --git a/src/log/ModDaemon.cc b/src/log/ModDaemon.cc index 770f25ae2f..f7ac5d3ca5 100644 --- a/src/log/ModDaemon.cc +++ b/src/log/ModDaemon.cc @@ -238,7 +238,7 @@ logfile_mod_daemon_open(Logfile * lf, const char *path, size_t bufsz, int fatal_ lf->f_rotate = logfile_mod_daemon_rotate; cbdataInternalLock(lf); // WTF? - debugs(50, 1, "Logfile Daemon: opening log " << path); + debugs(50, DBG_IMPORTANT, "Logfile Daemon: opening log " << path); ll = static_cast(xcalloc(1, sizeof(*ll))); lf->data = ll; ll->eol = 1; @@ -270,7 +270,7 @@ static void logfile_mod_daemon_close(Logfile * lf) { l_daemon_t *ll = static_cast(lf->data); - debugs(50, 1, "Logfile Daemon: closing log " << lf->path); + debugs(50, DBG_IMPORTANT, "Logfile Daemon: closing log " << lf->path); logfileFlush(lf); if (ll->rfd == ll->wfd) comm_close(ll->rfd); @@ -289,7 +289,7 @@ static void logfile_mod_daemon_rotate(Logfile * lf) { char tb[3]; - debugs(50, 1, "logfileRotate: " << lf->path); + debugs(50, DBG_IMPORTANT, "logfileRotate: " << lf->path); tb[0] = 'R'; tb[1] = '\n'; tb[2] = '\0'; diff --git a/src/log/ModSyslog.cc b/src/log/ModSyslog.cc index 77e739e747..2d5dd3820b 100644 --- a/src/log/ModSyslog.cc +++ b/src/log/ModSyslog.cc @@ -108,7 +108,7 @@ syslog_ntoa(const char *s) if (!strcmp(s, p->name) || !strcasecmp(s, p->name + 4)) return p->value; - debugs(1, 1, "Unknown syslog facility/priority '" << s << "'"); + debugs(1, DBG_IMPORTANT, "Unknown syslog facility/priority '" << s << "'"); return 0; } diff --git a/src/log/ModTcp.cc b/src/log/ModTcp.cc index 49a820b257..9fd4d49262 100644 --- a/src/log/ModTcp.cc +++ b/src/log/ModTcp.cc @@ -63,10 +63,10 @@ logfile_mod_tcp_write(Logfile * lf, const char *buf, size_t len) fd_bytes(ll->fd, s, FD_WRITE); #if 0 if (s < 0) { - debugs(1, 1, "logfile (tcp): got errno (" << errno << "):" << xstrerror()); + debugs(1, DBG_IMPORTANT, "logfile (tcp): got errno (" << errno << "):" << xstrerror()); } if (s != len) { - debugs(1, 1, "logfile (tcp): len=" << len << ", wrote=" << s); + debugs(1, DBG_IMPORTANT, "logfile (tcp): len=" << len << ", wrote=" << s); } #endif diff --git a/src/log/ModUdp.cc b/src/log/ModUdp.cc index 800bc307a9..cc6c3ac7c4 100644 --- a/src/log/ModUdp.cc +++ b/src/log/ModUdp.cc @@ -61,10 +61,10 @@ logfile_mod_udp_write(Logfile * lf, const char *buf, size_t len) fd_bytes(ll->fd, s, FD_WRITE); #if 0 if (s < 0) { - debugs(1, 1, "logfile (udp): got errno (" << errno << "):" << xstrerror()); + debugs(1, DBG_IMPORTANT, "logfile (udp): got errno (" << errno << "):" << xstrerror()); } if (s != len) { - debugs(1, 1, "logfile (udp): len=" << len << ", wrote=" << s); + debugs(1, DBG_IMPORTANT, "logfile (udp): len=" << len << ", wrote=" << s); } #endif diff --git a/src/log/access_log.cc b/src/log/access_log.cc index d5ff51f851..355946cb2d 100644 --- a/src/log/access_log.cc +++ b/src/log/access_log.cc @@ -362,7 +362,7 @@ accessLogInit(void) if (mcast_miss_fd < 0) fatal("Cannot open Multicast Miss Stream Socket"); - debugs(46, 1, "Multicast Miss Stream Socket opened on FD " << mcast_miss_fd); + debugs(46, DBG_IMPORTANT, "Multicast Miss Stream Socket opened on FD " << mcast_miss_fd); mcastSetTtl(mcast_miss_fd, Config.mcast_miss.ttl); diff --git a/src/main.cc b/src/main.cc index d6eb01aa87..af63250606 100644 --- a/src/main.cc +++ b/src/main.cc @@ -236,8 +236,8 @@ SignalEngine::checkEvents(int timeout) void SignalEngine::doShutdown(time_t wait) { - debugs(1, 1, "Preparing for shutdown after " << statCounter.client_http.requests << " requests"); - debugs(1, 1, "Waiting " << wait << " seconds for active connections to finish"); + debugs(1, DBG_IMPORTANT, "Preparing for shutdown after " << statCounter.client_http.requests << " requests"); + debugs(1, DBG_IMPORTANT, "Waiting " << wait << " seconds for active connections to finish"); shutting_down = 1; @@ -724,7 +724,7 @@ serverConnectionsClose(void) static void mainReconfigureStart(void) { - debugs(1, 1, "Reconfiguring Squid Cache (version " << version_string << ")..."); + debugs(1, DBG_IMPORTANT, "Reconfiguring Squid Cache (version " << version_string << ")..."); reconfiguring = 1; // Initiate asynchronous closing sequence @@ -927,7 +927,7 @@ mainSetCwd(void) if (0 == strcmp("none", Config.coredump_dir)) { (void) 0; } else if (chdir(Config.coredump_dir) == 0) { - debugs(0, 1, "Set Current Directory to " << Config.coredump_dir); + debugs(0, DBG_IMPORTANT, "Set Current Directory to " << Config.coredump_dir); return; } else { debugs(50, 0, "chdir: " << Config.coredump_dir << ": " << xstrerror()); @@ -936,7 +936,7 @@ mainSetCwd(void) /* If we don't have coredump_dir or couldn't cd there, report current dir */ if (getcwd(pathbuf, MAXPATHLEN)) { - debugs(0, 1, "Current Directory is " << pathbuf); + debugs(0, DBG_IMPORTANT, "Current Directory is " << pathbuf); } else { debugs(50, 0, "WARNING: Can't find current directory, getcwd: " << xstrerror()); } @@ -984,19 +984,19 @@ mainInitialize(void) debugs(1, 0, "Running on " << WIN32_OS_string); #endif - debugs(1, 1, "Process ID " << getpid()); + debugs(1, DBG_IMPORTANT, "Process ID " << getpid()); - debugs(1, 1, "Process Roles:" << ProcessRoles()); + debugs(1, DBG_IMPORTANT, "Process Roles:" << ProcessRoles()); setSystemLimits(); - debugs(1, 1, "With " << Squid_MaxFD << " file descriptors available"); + debugs(1, DBG_IMPORTANT, "With " << Squid_MaxFD << " file descriptors available"); #if _SQUID_MSWIN_ - debugs(1, 1, "With " << _getmaxstdio() << " CRT stdio descriptors available"); + debugs(1, DBG_IMPORTANT, "With " << _getmaxstdio() << " CRT stdio descriptors available"); if (WIN32_Socks_initialized) - debugs(1, 1, "Windows sockets initialized"); + debugs(1, DBG_IMPORTANT, "Windows sockets initialized"); if (WIN32_OS_version > _WIN_OS_WINNT) { WIN32_IpAddrChangeMonitorInit(); @@ -1516,7 +1516,7 @@ sendSignal(void) debug_log = stderr; if (strcmp(Config.pidFilename, "none") == 0) { - debugs(0, 1, "No pid_filename specified. Trusting you know what you are doing."); + debugs(0, DBG_IMPORTANT, "No pid_filename specified. Trusting you know what you are doing."); } pid = readPidFile(); @@ -1822,7 +1822,7 @@ SquidShutdown() WIN32_svcstatusupdate(SERVICE_STOP_PENDING, 10000); #endif - debugs(1, 1, "Shutting down..."); + debugs(1, DBG_IMPORTANT, "Shutting down..."); dnsShutdown(); #if USE_SSL_CRTD Ssl::Helper::GetInstance()->Shutdown(); @@ -1936,7 +1936,7 @@ SquidShutdown() } } - debugs(1, 1, "Squid Cache (Version " << version_string << "): Exiting normally."); + debugs(1, DBG_IMPORTANT, "Squid Cache (Version " << version_string << "): Exiting normally."); /* * DPW 2006-10-23 diff --git a/src/mem.cc b/src/mem.cc index ada71546e0..9f84a127e4 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -162,9 +162,9 @@ Mem::Stats(StoreEntry * sentry) long int leaked = 0, dubious = 0, reachable = 0, suppressed = 0; stream << "Valgrind Report:\n"; stream << "Type\tAmount\n"; - debugs(13, 1, "Asking valgrind for memleaks"); + debugs(13, DBG_IMPORTANT, "Asking valgrind for memleaks"); VALGRIND_DO_LEAK_CHECK; - debugs(13, 1, "Getting valgrind statistics"); + debugs(13, DBG_IMPORTANT, "Getting valgrind statistics"); VALGRIND_COUNT_LEAKS(leaked, dubious, reachable, suppressed); stream << "Leaked\t" << leaked << "\n"; stream << "Dubious\t" << dubious << "\n"; @@ -389,7 +389,7 @@ memConfigure(void) new_pool_limit = Config.MemPools.limit; else { if (Config.MemPools.limit == 0) - debugs(13, 1, "memory_pools_limit 0 has been chagned to memory_pools_limit none. Please update your config"); + debugs(13, DBG_IMPORTANT, "memory_pools_limit 0 has been chagned to memory_pools_limit none. Please update your config"); new_pool_limit = -1; } @@ -401,7 +401,7 @@ memConfigure(void) * stderr when doing things like 'squid -k reconfigure' */ if (MemPools::GetInstance().idleLimit() > new_pool_limit) - debugs(13, 1, "Shrinking idle mem pools to "<< std::setprecision(3) << toMB(new_pool_limit) << " MB"); + debugs(13, DBG_IMPORTANT, "Shrinking idle mem pools to "<< std::setprecision(3) << toMB(new_pool_limit) << " MB"); #endif MemPools::GetInstance().setIdleLimit(new_pool_limit); @@ -467,7 +467,7 @@ Mem::Init(void) StrPools[i].pool->zeroOnPush(false); if (StrPools[i].pool->objectSize() != StrPoolsAttrs[i].obj_size) - debugs(13, 1, "Notice: " << StrPoolsAttrs[i].name << " is " << StrPools[i].pool->objectSize() << " bytes instead of requested " << StrPoolsAttrs[i].obj_size << " bytes"); + debugs(13, DBG_IMPORTANT, "Notice: " << StrPoolsAttrs[i].name << " is " << StrPools[i].pool->objectSize() << " bytes instead of requested " << StrPoolsAttrs[i].obj_size << " bytes"); } MemIsInitialized = true; diff --git a/src/mime.cc b/src/mime.cc index 704a5fb00c..f68555e154 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -276,7 +276,7 @@ mimeInit(char *filename) return; if ((fp = fopen(filename, "r")) == NULL) { - debugs(25, 1, "mimeInit: " << filename << ": " << xstrerror()); + debugs(25, DBG_IMPORTANT, "mimeInit: " << filename << ": " << xstrerror()); return; } @@ -302,27 +302,27 @@ mimeInit(char *filename) xstrncpy(chopbuf, buf, BUFSIZ); if ((pattern = strtok(chopbuf, w_space)) == NULL) { - debugs(25, 1, "mimeInit: parse error: '" << buf << "'"); + debugs(25, DBG_IMPORTANT, "mimeInit: parse error: '" << buf << "'"); continue; } if ((type = strtok(NULL, w_space)) == NULL) { - debugs(25, 1, "mimeInit: parse error: '" << buf << "'"); + debugs(25, DBG_IMPORTANT, "mimeInit: parse error: '" << buf << "'"); continue; } if ((icon = strtok(NULL, w_space)) == NULL) { - debugs(25, 1, "mimeInit: parse error: '" << buf << "'"); + debugs(25, DBG_IMPORTANT, "mimeInit: parse error: '" << buf << "'"); continue; } if ((encoding = strtok(NULL, w_space)) == NULL) { - debugs(25, 1, "mimeInit: parse error: '" << buf << "'"); + debugs(25, DBG_IMPORTANT, "mimeInit: parse error: '" << buf << "'"); continue; } if ((mode = strtok(NULL, w_space)) == NULL) { - debugs(25, 1, "mimeInit: parse error: '" << buf << "'"); + debugs(25, DBG_IMPORTANT, "mimeInit: parse error: '" << buf << "'"); continue; } @@ -335,11 +335,11 @@ mimeInit(char *filename) else if (!strcmp(option, "+view")) view_option = 1; else - debugs(25, 1, "mimeInit: unknown option: '" << buf << "' (" << option << ")"); + debugs(25, DBG_IMPORTANT, "mimeInit: unknown option: '" << buf << "' (" << option << ")"); } if (regcomp(&re, pattern, re_flags) != 0) { - debugs(25, 1, "mimeInit: regcomp error: '" << buf << "'"); + debugs(25, DBG_IMPORTANT, "mimeInit: regcomp error: '" << buf << "'"); continue; } @@ -376,7 +376,7 @@ mimeInit(char *filename) for (m = MimeTable; m != NULL; m = m->next) m->theIcon.load(); - debugs(25, 1, "Loaded Icons."); + debugs(25, DBG_IMPORTANT, "Loaded Icons."); } void diff --git a/src/multicast.cc b/src/multicast.cc index e7b259143b..29b2824600 100644 --- a/src/multicast.cc +++ b/src/multicast.cc @@ -46,7 +46,7 @@ mcastSetTtl(int fd, int mcast_ttl) char ttl = (char) mcast_ttl; if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, 1) < 0) - debugs(50, 1, "comm_set_mcast_ttl: FD " << fd << ", TTL: " << mcast_ttl << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "comm_set_mcast_ttl: FD " << fd << ", TTL: " << mcast_ttl << ": " << xstrerror()); #endif diff --git a/src/neighbors.cc b/src/neighbors.cc index cd98407319..08bd414794 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -442,7 +442,7 @@ void peerAlive(peer *p) { if (p->stats.logged_state == PEER_DEAD && p->tcp_up) { - debugs(15, 1, "Detected REVIVED " << neighborTypeStr(p) << ": " << p->name); + debugs(15, DBG_IMPORTANT, "Detected REVIVED " << neighborTypeStr(p) << ": " << p->name); p->stats.logged_state = PEER_ALIVE; peerClearRR(); } @@ -681,7 +681,7 @@ neighborsUdpPing(HttpRequest * request, /* log it once at the threshold */ if (p->stats.logged_state == PEER_ALIVE) { - debugs(15, 1, "Detected DEAD " << neighborTypeStr(p) << ": " << p->name); + debugs(15, DBG_IMPORTANT, "Detected DEAD " << neighborTypeStr(p) << ": " << p->name); p->stats.logged_state = PEER_DEAD; } } @@ -942,7 +942,7 @@ neighborIgnoreNonPeer(const Ip::Address &from, icp_opcode opcode) ++ np->icp.counts[opcode]; if (isPowTen(++np->stats.ignored_replies)) - debugs(15, 1, "WARNING: Ignored " << np->stats.ignored_replies << " replies from non-peer " << np->host); + debugs(15, DBG_IMPORTANT, "WARNING: Ignored " << np->stats.ignored_replies << " replies from non-peer " << np->host); } /* ignoreMulticastReply @@ -1026,7 +1026,7 @@ neighborsUdpAck(const cache_key * key, icp_common_t * header, const Ip::Address if (entry->lock_count == 0) { // TODO: many entries are unlocked; why is this reported at level 1? - debugs(12, 1, "neighborsUdpAck: '" << storeKeyText(key) << "' has no locks"); + debugs(12, DBG_IMPORTANT, "neighborsUdpAck: '" << storeKeyText(key) << "' has no locks"); neighborCountIgnored(p); return; } @@ -1063,10 +1063,10 @@ neighborsUdpAck(const cache_key * key, icp_common_t * header, const Ip::Address } } else if (opcode == ICP_SECHO) { if (p) { - debugs(15, 1, "Ignoring SECHO from neighbor " << p->host); + debugs(15, DBG_IMPORTANT, "Ignoring SECHO from neighbor " << p->host); neighborCountIgnored(p); } else { - debugs(15, 1, "Unsolicited SECHO from " << from); + debugs(15, DBG_IMPORTANT, "Unsolicited SECHO from " << from); } } else if (opcode == ICP_DENIED) { if (p == NULL) { @@ -1194,10 +1194,10 @@ peerDNSConfigure(const ipcache_addrs *ia, const DnsLookupDetails &, void *data) int j; if (p->n_addresses == 0) { - debugs(15, 1, "Configuring " << neighborTypeStr(p) << " " << p->host << "/" << p->http_port << "/" << p->icp.port); + debugs(15, DBG_IMPORTANT, "Configuring " << neighborTypeStr(p) << " " << p->host << "/" << p->http_port << "/" << p->icp.port); if (p->type == PEER_MULTICAST) - debugs(15, 1, " Multicast TTL = " << p->mcast.ttl); + debugs(15, DBG_IMPORTANT, " Multicast TTL = " << p->mcast.ttl); } p->n_addresses = 0; @@ -1270,7 +1270,7 @@ peerConnectFailedSilent(peer * p) -- p->tcp_up; if (!p->tcp_up) { - debugs(15, 1, "Detected DEAD " << neighborTypeStr(p) << ": " << p->name); + debugs(15, DBG_IMPORTANT, "Detected DEAD " << neighborTypeStr(p) << ": " << p->name); p->stats.logged_state = PEER_DEAD; } } @@ -1278,7 +1278,7 @@ peerConnectFailedSilent(peer * p) void peerConnectFailed(peer *p) { - debugs(15, 1, "TCP connection to " << p->host << "/" << p->http_port << " failed"); + debugs(15, DBG_IMPORTANT, "TCP connection to " << p->host << "/" << p->http_port << " failed"); peerConnectFailedSilent(p); } @@ -1412,7 +1412,7 @@ peerCountMcastPeersDone(void *data) peer *p = (peer *)psstate->callback_data; p->mcast.flags.counting = 0; p->mcast.avg_n_members = Math::doubleAverage(p->mcast.avg_n_members, (double) psstate->ping.n_recv, ++p->mcast.n_times_counted, 10); - debugs(15, 1, "Group " << p->host << ": " << psstate->ping.n_recv << + debugs(15, DBG_IMPORTANT, "Group " << p->host << ": " << psstate->ping.n_recv << " replies, "<< std::setw(4)<< std::setprecision(2) << p->mcast.avg_n_members <<" average, RTT " << p->stats.rtt); p->mcast.n_replies_expected = (int) p->mcast.avg_n_members; @@ -1730,7 +1730,7 @@ neighborsHtcpReply(const cache_key * key, htcpReplyData * htcp, const Ip::Addres if (e->lock_count == 0) { // TODO: many entries are unlocked; why is this reported at level 1? - debugs(12, 1, "neighborsUdpAck: '" << storeKeyText(key) << "' has no locks"); + debugs(12, DBG_IMPORTANT, "neighborsUdpAck: '" << storeKeyText(key) << "' has no locks"); neighborCountIgnored(p); return; } diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 973a1af4b6..ad1557a780 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -634,7 +634,7 @@ peerDigestSwapInHeaders(void *data, char *buf, ssize_t size) assert (fetch->entry->getReply()->sline.status != 0); if (fetch->entry->getReply()->sline.status != HTTP_OK) { - debugs(72, 1, "peerDigestSwapInHeaders: " << fetch->pd->host << + debugs(72, DBG_IMPORTANT, "peerDigestSwapInHeaders: " << fetch->pd->host << " status " << fetch->entry->getReply()->sline.status << " got cached!"); @@ -882,7 +882,7 @@ peerDigestPDFinish(DigestFetchState * fetch, int pcb_valid, int err) pd->stats.recv.msgs += fetch->recv.msg; if (err) { - debugs(72, 1, "" << (pcb_valid ? "temporary " : "" ) << "disabling (" << pd->req_result << ") digest from " << host); + debugs(72, DBG_IMPORTANT, "" << (pcb_valid ? "temporary " : "" ) << "disabling (" << pd->req_result << ") digest from " << host); if (pd->cd) { cacheDigestDestroy(pd->cd); @@ -1007,14 +1007,14 @@ peerDigestSetCBlock(PeerDigest * pd, const char *buf) /* check version requirements (both ways) */ if (cblock.ver.required > CacheDigestVer.current) { - debugs(72, 1, "" << host << " digest requires version " << + debugs(72, DBG_IMPORTANT, "" << host << " digest requires version " << cblock.ver.required << "; have: " << CacheDigestVer.current); return 0; } if (cblock.ver.current < CacheDigestVer.required) { - debugs(72, 1, "" << host << " digest is version " << + debugs(72, DBG_IMPORTANT, "" << host << " digest is version " << cblock.ver.current << "; we require: " << CacheDigestVer.required); diff --git a/src/peer_select.cc b/src/peer_select.cc index 6b604b428c..c517b1335d 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -93,7 +93,7 @@ peerSelectStateFree(ps_state * psstate) } if (psstate->acl_checklist) { - debugs(44, 1, "calling aclChecklistFree() from peerSelectStateFree"); + debugs(44, DBG_IMPORTANT, "calling aclChecklistFree() from peerSelectStateFree"); delete (psstate->acl_checklist); } @@ -899,7 +899,7 @@ peerHandlePingReply(peer * p, peer_t type, AnyP::ProtocolType proto, void *pingd #endif else - debugs(44, 1, "peerHandlePingReply: unknown protocol " << proto); + debugs(44, DBG_IMPORTANT, "peerHandlePingReply: unknown protocol " << proto); } static void diff --git a/src/repl/heap/store_repl_heap.cc b/src/repl/heap/store_repl_heap.cc index 0121e0fcd3..6a564b0d21 100644 --- a/src/repl/heap/store_repl_heap.cc +++ b/src/repl/heap/store_repl_heap.cc @@ -320,7 +320,7 @@ createRemovalPolicy_heap(wordlist * args) keytype = args->key; args = args->next; } else { - debugs(81, 1, "createRemovalPolicy_heap: No key type specified. Using LRU"); + debugs(81, DBG_IMPORTANT, "createRemovalPolicy_heap: No key type specified. Using LRU"); keytype = "LRU"; } diff --git a/src/send-announce.cc b/src/send-announce.cc index 79d80b9f90..41a9e2bb38 100644 --- a/src/send-announce.cc +++ b/src/send-announce.cc @@ -71,11 +71,11 @@ send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *junk) int fd; if (ia == NULL) { - debugs(27, 1, "send_announce: Unknown host '" << host << "'"); + debugs(27, DBG_IMPORTANT, "send_announce: Unknown host '" << host << "'"); return; } - debugs(27, 1, "Sending Announcement to " << host); + debugs(27, DBG_IMPORTANT, "Sending Announcement to " << host); sndbuf[0] = '\0'; snprintf(tbuf, 256, "cache_version SQUID/%s\n", version_string); strcat(sndbuf, tbuf); @@ -106,7 +106,7 @@ send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *junk) sndbuf[l] = '\0'; file_close(fd); } else { - debugs(50, 1, "send_announce: " << file << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "send_announce: " << file << ": " << xstrerror()); } } @@ -115,5 +115,5 @@ send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *junk) assert(Comm::IsConnOpen(icpOutgoingConn)); if (comm_udp_sendto(icpOutgoingConn->fd, S, sndbuf, strlen(sndbuf) + 1) < 0) - debugs(27, 1, "ERROR: Failed to announce to " << S << " from " << icpOutgoingConn->local << ": " << xstrerror()); + debugs(27, DBG_IMPORTANT, "ERROR: Failed to announce to " << S << " from " << icpOutgoingConn->local << ": " << xstrerror()); } diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 940b0d0a77..6316a2c491 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -387,7 +387,7 @@ snmpHandleUdp(int sock, void *not_used) xfree(snmp_rq->outbuf); xfree(snmp_rq); } else { - debugs(49, 1, "snmpHandleUdp: FD " << sock << " recvfrom: " << xstrerror()); + debugs(49, DBG_IMPORTANT, "snmpHandleUdp: FD " << sock << " recvfrom: " << xstrerror()); } } diff --git a/src/ssl/helper.cc b/src/ssl/helper.cc index 18414d2439..2c6c227bd4 100644 --- a/src/ssl/helper.cc +++ b/src/ssl/helper.cc @@ -93,7 +93,7 @@ void Ssl::Helper::sslSubmit(CrtdMessage const & message, HLPCB * callback, void first_warn = squid_curtime; if (squid_curtime - first_warn > 3 * 60) fatal("SSL servers not responding for 3 minutes"); - debugs(34, 1, HERE << "Queue overload, rejecting"); + debugs(34, DBG_IMPORTANT, HERE << "Queue overload, rejecting"); callback(data, (char *)"error 45 Temporary network problem, please retry later"); return; } diff --git a/src/ssl/support.cc b/src/ssl/support.cc index 639f021037..c3e970745d 100644 --- a/src/ssl/support.cc +++ b/src/ssl/support.cc @@ -125,12 +125,12 @@ ssl_temp_rsa_cb(SSL * ssl, int anInt, int keylen) break; default: - debugs(83, 1, "ssl_temp_rsa_cb: Unexpected key length " << keylen); + debugs(83, DBG_IMPORTANT, "ssl_temp_rsa_cb: Unexpected key length " << keylen); return NULL; } if (rsa == NULL) { - debugs(83, 1, "ssl_temp_rsa_cb: Failed to generate key " << keylen); + debugs(83, DBG_IMPORTANT, "ssl_temp_rsa_cb: Failed to generate key " << keylen); return NULL; } @@ -138,7 +138,7 @@ ssl_temp_rsa_cb(SSL * ssl, int anInt, int keylen) if (do_debug(83, 5)) PEM_write_RSAPrivateKey(debug_log, rsa, NULL, NULL, 0, NULL, NULL); - debugs(83, 1, "Generated ephemeral RSA key of length " << keylen); + debugs(83, DBG_IMPORTANT, "Generated ephemeral RSA key of length " << keylen); } return rsa; @@ -1017,7 +1017,7 @@ sslCreateClientContext(const char *certfile, const char *keyfile, int version, c } if (certfile) { - debugs(83, 1, "Using certificate in " << certfile); + debugs(83, DBG_IMPORTANT, "Using certificate in " << certfile); if (!SSL_CTX_use_certificate_chain_file(sslContext, certfile)) { ssl_error = ERR_get_error(); @@ -1025,7 +1025,7 @@ sslCreateClientContext(const char *certfile, const char *keyfile, int version, c certfile, ERR_error_string(ssl_error, NULL)); } - debugs(83, 1, "Using private key in " << keyfile); + debugs(83, DBG_IMPORTANT, "Using private key in " << keyfile); ssl_ask_password(sslContext, keyfile); if (!SSL_CTX_use_PrivateKey_file(sslContext, keyfile, SSL_FILETYPE_PEM)) { @@ -1150,7 +1150,7 @@ ssl_get_attribute(X509_NAME * name, const char *attribute_name) nid = OBJ_txt2nid((char *) attribute_name); if (nid == 0) { - debugs(83, 1, "WARNING: Unknown SSL attribute name '" << attribute_name << "'"); + debugs(83, DBG_IMPORTANT, "WARNING: Unknown SSL attribute name '" << attribute_name << "'"); return NULL; } diff --git a/src/stat.cc b/src/stat.cc index db735a02f1..518bbfc2c7 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1076,7 +1076,7 @@ GetAvgStat(Mgr::IntervalActionData& stats, int minutes, int hours) l = &CountHourHist[hours]; } else { - debugs(18, 1, "statAvgDump: Invalid args, minutes=" << minutes << ", hours=" << hours); + debugs(18, DBG_IMPORTANT, "statAvgDump: Invalid args, minutes=" << minutes << ", hours=" << hours); return; } @@ -1984,7 +1984,7 @@ statByteHitRatio(int minutes) cd = CountHist[0].cd.kbytes_recv.kb - CountHist[minutes].cd.kbytes_recv.kb; if (s < cd) - debugs(18, 1, "STRANGE: srv_kbytes=" << s << ", cd_kbytes=" << cd); + debugs(18, DBG_IMPORTANT, "STRANGE: srv_kbytes=" << s << ", cd_kbytes=" << cd); s -= cd; diff --git a/src/stmem.cc b/src/stmem.cc index 716c3097fa..09928c3423 100644 --- a/src/stmem.cc +++ b/src/stmem.cc @@ -255,7 +255,7 @@ mem_hdr::copy(StoreIOBuffer const &target) const /* we shouldn't ever ask for absent offsets */ if (nodes.size() == 0) { - debugs(19, 1, "mem_hdr::copy: No data to read"); + debugs(19, DBG_IMPORTANT, "mem_hdr::copy: No data to read"); debugDump(); assert (0); return 0; @@ -268,7 +268,7 @@ mem_hdr::copy(StoreIOBuffer const &target) const mem_node *p = getBlockContainingLocation(target.offset); if (!p) { - debugs(19, 1, "memCopy: could not find start of " << target.range() << + debugs(19, DBG_IMPORTANT, "memCopy: could not find start of " << target.range() << " in memory."); debugDump(); fatal("Squid has attempted to read data from memory that is not present. This is an indication of of (pre-3.0) code that hasn't been updated to deal with sparse objects in memory. Squid should coredump.allowing to review the cause. Immediately preceeding this message is a dump of the available data in the format [start,end). The [ means from the value, the ) means up to the value. I.e. [1,5) means that there are 4 bytes of data, at offsets 1,2,3,4.\n"); @@ -424,8 +424,8 @@ mem_hdr::NodeCompare(mem_node * const &left, mem_node * const &right) void mem_hdr::dump() const { - debugs(20, 1, "mem_hdr: " << (void *)this << " nodes.start() " << nodes.start()); - debugs(20, 1, "mem_hdr: " << (void *)this << " nodes.finish() " << nodes.finish()); + debugs(20, DBG_IMPORTANT, "mem_hdr: " << (void *)this << " nodes.start() " << nodes.start()); + debugs(20, DBG_IMPORTANT, "mem_hdr: " << (void *)this << " nodes.finish() " << nodes.finish()); } size_t diff --git a/src/store.cc b/src/store.cc index b05a2ebd84..bbe09799bd 100644 --- a/src/store.cc +++ b/src/store.cc @@ -323,7 +323,7 @@ StoreEntry::storeClientType() const if (EBIT_TEST(flags, ENTRY_ABORTED)) { /* I don't think we should be adding clients to aborted entries */ - debugs(20, 1, "storeClientType: adding to ENTRY_ABORTED entry"); + debugs(20, DBG_IMPORTANT, "storeClientType: adding to ENTRY_ABORTED entry"); return STORE_MEM_CLIENT; } @@ -572,7 +572,7 @@ StoreEntry::unlock() } if (EBIT_TEST(flags, KEY_PRIVATE)) - debugs(20, 1, "WARNING: " << __FILE__ << ":" << __LINE__ << ": found KEY_PRIVATE"); + debugs(20, DBG_IMPORTANT, "WARNING: " << __FILE__ << ":" << __LINE__ << ": found KEY_PRIVATE"); Store::Root().handleIdleEntry(*this); // may delete us return 0; @@ -709,7 +709,7 @@ StoreEntry::setPublicKey() #if MORE_DEBUG_OUTPUT if (EBIT_TEST(flags, RELEASE_REQUEST)) - debugs(20, 1, "assertion failed: RELEASE key " << key << ", url " << mem_obj->url); + debugs(20, DBG_IMPORTANT, "assertion failed: RELEASE key " << key << ", url " << mem_obj->url); #endif @@ -1131,7 +1131,7 @@ StoreEntry::abort() */ if (mem_obj->abort.callback) { if (!cbdataReferenceValid(mem_obj->abort.data)) - debugs(20,1,HERE << "queueing event when abort.data is not valid"); + debugs(20, DBG_IMPORTANT,HERE << "queueing event when abort.data is not valid"); eventAdd("mem_obj->abort.callback", mem_obj->abort.callback, mem_obj->abort.data, @@ -1320,7 +1320,7 @@ storeLateRelease(void *unused) if (e == NULL) { /* done! */ - debugs(20, 1, "storeLateRelease: released " << n << " objects"); + debugs(20, DBG_IMPORTANT, "storeLateRelease: released " << n << " objects"); return; } @@ -1763,7 +1763,7 @@ storeReplAdd(const char *type, REMOVALPOLICYCREATE * create) /* find the number of currently known repl types */ for (i = 0; storerepl_list && storerepl_list[i].typestr; ++i) { if (strcmp(storerepl_list[i].typestr, type) == 0) { - debugs(20, 1, "WARNING: Trying to load store replacement policy " << type << " twice."); + debugs(20, DBG_IMPORTANT, "WARNING: Trying to load store replacement policy " << type << " twice."); return; } } @@ -1791,9 +1791,9 @@ createRemovalPolicy(RemovalPolicySettings * settings) return r->create(settings->args); } - debugs(20, 1, "ERROR: Unknown policy " << settings->type); - debugs(20, 1, "ERROR: Be sure to have set cache_replacement_policy"); - debugs(20, 1, "ERROR: and memory_replacement_policy in squid.conf!"); + debugs(20, DBG_IMPORTANT, "ERROR: Unknown policy " << settings->type); + debugs(20, DBG_IMPORTANT, "ERROR: Be sure to have set cache_replacement_policy"); + debugs(20, DBG_IMPORTANT, "ERROR: and memory_replacement_policy in squid.conf!"); fatalf("ERROR: Unknown policy %s\n", settings->type); return NULL; /* NOTREACHED */ } diff --git a/src/store_client.cc b/src/store_client.cc index 5275dafea6..639623a467 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -412,7 +412,7 @@ store_client::startSwapin() return; } else { - debugs(90, 1, "WARNING: Averted multiple fd operation (1)"); + debugs(90, DBG_IMPORTANT, "WARNING: Averted multiple fd operation (1)"); flags.store_copying = 0; return; } @@ -571,7 +571,7 @@ store_client::unpackHeader(char const *buf, ssize_t len) if (!aBuilder.isBufferSane()) { /* oops, bad disk file? */ - debugs(90, 1, "WARNING: swapfile header inconsistent with available data"); + debugs(90, DBG_IMPORTANT, "WARNING: swapfile header inconsistent with available data"); fail(); return; } @@ -579,7 +579,7 @@ store_client::unpackHeader(char const *buf, ssize_t len) tlv *tlv_list = aBuilder.createStoreMeta (); if (tlv_list == NULL) { - debugs(90, 1, "WARNING: failed to unpack meta data"); + debugs(90, DBG_IMPORTANT, "WARNING: failed to unpack meta data"); fail(); return; } diff --git a/src/store_digest.cc b/src/store_digest.cc index 715bebb063..3e68bf0622 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -125,7 +125,7 @@ storeDigestInit(void) } store_digest = cacheDigestCreate(cap, Config.digest.bits_per_entry); - debugs(71, 1, "Local cache digest enabled; rebuild/rewrite every " << + debugs(71, DBG_IMPORTANT, "Local cache digest enabled; rebuild/rewrite every " << (int) Config.digest.rebuild_period << "/" << (int) Config.digest.rewrite_period << " sec"); @@ -299,7 +299,7 @@ storeDigestRebuildStart(void *datanotused) /* prevent overlapping if rebuild schedule is too tight */ if (sd_state.rebuild_lock) { - debugs(71, 1, "storeDigestRebuildStart: overlap detected, consider increasing rebuild period"); + debugs(71, DBG_IMPORTANT, "storeDigestRebuildStart: overlap detected, consider increasing rebuild period"); return; } @@ -381,7 +381,7 @@ storeDigestRewriteStart(void *datanotused) /* prevent overlapping if rewrite schedule is too tight */ if (sd_state.rewrite_lock) { - debugs(71, 1, "storeDigestRewrite: overlap detected, consider increasing rewrite period"); + debugs(71, DBG_IMPORTANT, "storeDigestRewrite: overlap detected, consider increasing rewrite period"); return; } diff --git a/src/store_dir.cc b/src/store_dir.cc index ace530e68b..e4560d2ba3 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -101,10 +101,10 @@ StoreController::init() if (0 == strcasecmp(Config.store_dir_select_algorithm, "round-robin")) { storeDirSelectSwapDir = storeDirSelectSwapDirRoundRobin; - debugs(47, 1, "Using Round Robin store dir selection"); + debugs(47, DBG_IMPORTANT, "Using Round Robin store dir selection"); } else { storeDirSelectSwapDir = storeDirSelectSwapDirLeastLoad; - debugs(47, 1, "Using Least Load store dir selection"); + debugs(47, DBG_IMPORTANT, "Using Least Load store dir selection"); } } @@ -408,7 +408,7 @@ SwapDir::diskFull() max_size = currentSize(); - debugs(20, 1, "WARNING: Shrinking cache_dir #" << index << " to " << currentSize() / 1024.0 << " KB"); + debugs(20, DBG_IMPORTANT, "WARNING: Shrinking cache_dir #" << index << " to " << currentSize() / 1024.0 << " KB"); } void @@ -447,12 +447,12 @@ storeDirWriteCleanLogs(int reopen) int notdone = 1; if (StoreController::store_dirs_rebuilding) { - debugs(20, 1, "Not currently OK to rewrite swap log."); - debugs(20, 1, "storeDirWriteCleanLogs: Operation aborted."); + debugs(20, DBG_IMPORTANT, "Not currently OK to rewrite swap log."); + debugs(20, DBG_IMPORTANT, "storeDirWriteCleanLogs: Operation aborted."); return 0; } - debugs(20, 1, "storeDirWriteCleanLogs: Starting..."); + debugs(20, DBG_IMPORTANT, "storeDirWriteCleanLogs: Starting..."); getCurrentTime(); start = current_time; @@ -460,7 +460,7 @@ storeDirWriteCleanLogs(int reopen) sd = dynamic_cast(INDEXSD(dirn)); if (sd->writeCleanStart() < 0) { - debugs(20, 1, "log.clean.start() failed for dir #" << sd->index); + debugs(20, DBG_IMPORTANT, "log.clean.start() failed for dir #" << sd->index); continue; } } @@ -493,7 +493,7 @@ storeDirWriteCleanLogs(int reopen) if ((++n & 0xFFFF) == 0) { getCurrentTime(); - debugs(20, 1, " " << std::setw(7) << n << + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << n << " entries written so far."); } } @@ -510,8 +510,8 @@ storeDirWriteCleanLogs(int reopen) dt = tvSubDsec(start, current_time); - debugs(20, 1, " Finished. Wrote " << n << " entries."); - debugs(20, 1, " Took "<< std::setw(3)<< std::setprecision(2) << dt << + debugs(20, DBG_IMPORTANT, " Finished. Wrote " << n << " entries."); + debugs(20, DBG_IMPORTANT, " Took "<< std::setw(3)<< std::setprecision(2) << dt << " seconds ("<< std::setw(6) << ((double) n / (dt > 0.0 ? dt : 1.0)) << " entries/sec)."); @@ -572,7 +572,7 @@ storeDirGetBlkSize(const char *path, int *blksize) struct statvfs sfs; if (statvfs(path, &sfs)) { - debugs(50, 1, "" << path << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror()); *blksize = 2048; return 1; } @@ -583,7 +583,7 @@ storeDirGetBlkSize(const char *path, int *blksize) struct statfs sfs; if (statfs(path, &sfs)) { - debugs(50, 1, "" << path << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror()); *blksize = 2048; return 1; } @@ -611,7 +611,7 @@ storeDirGetUFSStats(const char *path, int *totl_kb, int *free_kb, int *totl_in, struct statvfs sfs; if (statvfs(path, &sfs)) { - debugs(50, 1, "" << path << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror()); return 1; } @@ -624,7 +624,7 @@ storeDirGetUFSStats(const char *path, int *totl_kb, int *free_kb, int *totl_in, struct statfs sfs; if (statfs(path, &sfs)) { - debugs(50, 1, "" << path << ": " << xstrerror()); + debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror()); return 1; } @@ -935,17 +935,17 @@ StoreHashIndex::init() /* this is very bogus, its specific to the any Store maintaining an * in-core index, not global */ size_t buckets = (Store::Root().maxSize() + Config.memMaxSize) / Config.Store.avgObjectSize; - debugs(20, 1, "Swap maxSize " << (Store::Root().maxSize() >> 10) << + debugs(20, DBG_IMPORTANT, "Swap maxSize " << (Store::Root().maxSize() >> 10) << " + " << ( Config.memMaxSize >> 10) << " KB, estimated " << buckets << " objects"); buckets /= Config.Store.objectsPerBucket; - debugs(20, 1, "Target number of buckets: " << buckets); + debugs(20, DBG_IMPORTANT, "Target number of buckets: " << buckets); /* ideally the full scan period should be configurable, for the * moment it remains at approximately 24 hours. */ store_hash_buckets = storeKeyHashBuckets(buckets); - debugs(20, 1, "Using " << store_hash_buckets << " Store buckets"); - debugs(20, 1, "Max Mem size: " << ( Config.memMaxSize >> 10) << " KB" << + debugs(20, DBG_IMPORTANT, "Using " << store_hash_buckets << " Store buckets"); + debugs(20, DBG_IMPORTANT, "Max Mem size: " << ( Config.memMaxSize >> 10) << " KB" << (Config.memShared ? " [shared]" : "")); - debugs(20, 1, "Max Swap size: " << (Store::Root().maxSize() >> 10) << " KB"); + debugs(20, DBG_IMPORTANT, "Max Swap size: " << (Store::Root().maxSize() >> 10) << " KB"); store_table = hash_create(storeKeyHashCmp, store_hash_buckets, storeKeyHashHash); diff --git a/src/store_log.cc b/src/store_log.cc index 7819708695..0c7b534306 100644 --- a/src/store_log.cc +++ b/src/store_log.cc @@ -71,7 +71,7 @@ storeLog(int tag, const StoreEntry * e) ++storeLogTagsCounts[tag]; if (mem != NULL) { if (mem->log_url == NULL) { - debugs(20, 1, "storeLog: NULL log_url for " << mem->url); + debugs(20, DBG_IMPORTANT, "storeLog: NULL log_url for " << mem->url); mem->dump(); mem->log_url = xstrdup(mem->url); } @@ -150,7 +150,7 @@ storeLogOpen(void) storeLogRegisterWithCacheManager(); if (Config.Log.store == NULL || strcmp(Config.Log.store, "none") == 0) { - debugs(20, 1, "Store logging disabled"); + debugs(20, DBG_IMPORTANT, "Store logging disabled"); return; } diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 8d35bc4059..460290f09d 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -103,13 +103,13 @@ storeCleanup(void *datanotused) if ((++validated & 0x3FFFF) == 0) /* TODO format the int with with a stream operator */ - debugs(20, 1, " " << validated << " Entries Validated so far."); + debugs(20, DBG_IMPORTANT, " " << validated << " Entries Validated so far."); } if (currentSearch->isDone()) { - debugs(20, 1, " Completed Validation Procedure"); - debugs(20, 1, " Validated " << validated << " Entries"); - debugs(20, 1, " store_swap_size = " << Store::Root().currentSize() / 1024.0 << " KB"); + debugs(20, DBG_IMPORTANT, " Completed Validation Procedure"); + debugs(20, DBG_IMPORTANT, " Validated " << validated << " Entries"); + debugs(20, DBG_IMPORTANT, " store_swap_size = " << Store::Root().currentSize() / 1024.0 << " KB"); --StoreController::store_dirs_rebuilding; assert(0 == StoreController::store_dirs_rebuilding); @@ -155,18 +155,18 @@ storeRebuildComplete(struct _store_rebuild_data *dc) dt = tvSubDsec(rebuild_start, current_time); - debugs(20, 1, "Finished rebuilding storage from disk."); - debugs(20, 1, " " << std::setw(7) << counts.scancount << " Entries scanned"); - debugs(20, 1, " " << std::setw(7) << counts.invalid << " Invalid entries."); - debugs(20, 1, " " << std::setw(7) << counts.badflags << " With invalid flags."); - debugs(20, 1, " " << std::setw(7) << counts.objcount << " Objects loaded."); - debugs(20, 1, " " << std::setw(7) << counts.expcount << " Objects expired."); - debugs(20, 1, " " << std::setw(7) << counts.cancelcount << " Objects cancelled."); - debugs(20, 1, " " << std::setw(7) << counts.dupcount << " Duplicate URLs purged."); - debugs(20, 1, " " << std::setw(7) << counts.clashcount << " Swapfile clashes avoided."); - debugs(20, 1, " Took "<< std::setw(3)<< std::setprecision(2) << dt << " seconds ("<< std::setw(6) << + debugs(20, DBG_IMPORTANT, "Finished rebuilding storage from disk."); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.scancount << " Entries scanned"); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.invalid << " Invalid entries."); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.badflags << " With invalid flags."); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.objcount << " Objects loaded."); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.expcount << " Objects expired."); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.cancelcount << " Objects cancelled."); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.dupcount << " Duplicate URLs purged."); + debugs(20, DBG_IMPORTANT, " " << std::setw(7) << counts.clashcount << " Swapfile clashes avoided."); + debugs(20, DBG_IMPORTANT, " Took "<< std::setw(3)<< std::setprecision(2) << dt << " seconds ("<< std::setw(6) << ((double) counts.objcount / (dt > 0.0 ? dt : 1.0)) << " objects/sec)."); - debugs(20, 1, "Beginning Validation Procedure"); + debugs(20, DBG_IMPORTANT, "Beginning Validation Procedure"); eventAdd("storeCleanup", storeCleanup, NULL, 0.0, 1); @@ -232,7 +232,7 @@ storeRebuildProgress(int sd_index, int total, int sofar) d += (double) RebuildProgress[sd_index].total; } - debugs(20, 1, "Store rebuilding is "<< std::setw(4)<< std::setprecision(2) << 100.0 * n / d << "% complete"); + debugs(20, DBG_IMPORTANT, "Store rebuilding is "<< std::setw(4)<< std::setprecision(2) << 100.0 * n / d << "% complete"); last_report = squid_curtime; } diff --git a/src/store_swapin.cc b/src/store_swapin.cc index d7b81875a2..8ad355217d 100644 --- a/src/store_swapin.cc +++ b/src/store_swapin.cc @@ -59,12 +59,12 @@ storeSwapInStart(store_client * sc) e->swap_filen << " " << e->getMD5Text()); if (e->swap_status != SWAPOUT_WRITING && e->swap_status != SWAPOUT_DONE) { - debugs(20, 1, "storeSwapInStart: bad swap_status (" << swapStatusStr[e->swap_status] << ")"); + debugs(20, DBG_IMPORTANT, "storeSwapInStart: bad swap_status (" << swapStatusStr[e->swap_status] << ")"); return; } if (e->swap_filen < 0) { - debugs(20, 1, "storeSwapInStart: swap_filen < 0"); + debugs(20, DBG_IMPORTANT, "storeSwapInStart: swap_filen < 0"); return; } diff --git a/src/tools.cc b/src/tools.cc index ce6f742873..3dfb24a9cc 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -785,7 +785,7 @@ no_suid(void) setuid(0); if (setuid(uid) < 0) - debugs(50, 1, "no_suid: setuid: " << xstrerror()); + debugs(50, DBG_IMPORTANT, "no_suid: setuid: " << xstrerror()); restoreCapabilities(0); @@ -1177,7 +1177,7 @@ parseEtcHosts(void) fp = fopen(Config.etcHostsPath, "r"); if (fp == NULL) { - debugs(1, 1, "parseEtcHosts: " << Config.etcHostsPath << ": " << xstrerror()); + debugs(1, DBG_IMPORTANT, "parseEtcHosts: " << Config.etcHostsPath << ": " << xstrerror()); return; } diff --git a/src/unlinkd.cc b/src/unlinkd.cc index d60d3028ec..62e7ad80a1 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -124,11 +124,11 @@ unlinkdUnlink(const char *path) bytes_written = write(unlinkd_wfd, buf, l); if (bytes_written < 0) { - debugs(2, 1, "unlinkdUnlink: write FD " << unlinkd_wfd << " failed: " << xstrerror()); + debugs(2, DBG_IMPORTANT, "unlinkdUnlink: write FD " << unlinkd_wfd << " failed: " << xstrerror()); safeunlink(path, 0); return; } else if (bytes_written != l) { - debugs(2, 1, "unlinkdUnlink: FD " << unlinkd_wfd << " only wrote " << bytes_written << " of " << l << " bytes"); + debugs(2, DBG_IMPORTANT, "unlinkdUnlink: FD " << unlinkd_wfd << " only wrote " << bytes_written << " of " << l << " bytes"); safeunlink(path, 0); return; } @@ -149,7 +149,7 @@ unlinkdClose(void) { if (unlinkd_wfd > -1) { - debugs(2, 1, "Closing unlinkd pipe on FD " << unlinkd_wfd); + debugs(2, DBG_IMPORTANT, "Closing unlinkd pipe on FD " << unlinkd_wfd); shutdown(unlinkd_wfd, SD_BOTH); comm_close(unlinkd_wfd); @@ -164,7 +164,7 @@ unlinkdClose(void) if (hIpc) { if (WaitForSingleObject(hIpc, 5000) != WAIT_OBJECT_0) { getCurrentTime(); - debugs(2, 1, "unlinkdClose: WARNING: (unlinkd," << pid << "d) didn't exit in 5 seconds"); + debugs(2, DBG_IMPORTANT, "unlinkdClose: WARNING: (unlinkd," << pid << "d) didn't exit in 5 seconds"); } CloseHandle(hIpc); @@ -176,7 +176,7 @@ unlinkdClose(void) if (unlinkd_wfd < 0) return; - debugs(2, 1, "Closing unlinkd pipe on FD " << unlinkd_wfd); + debugs(2, DBG_IMPORTANT, "Closing unlinkd pipe on FD " << unlinkd_wfd); file_close(unlinkd_wfd); @@ -259,7 +259,7 @@ unlinkdInit(void) if (FD_PIPE == fd_table[unlinkd_wfd].type) commUnsetNonBlocking(unlinkd_wfd); - debugs(2, 1, "Unlinkd pipe opened on FD " << unlinkd_wfd); + debugs(2, DBG_IMPORTANT, "Unlinkd pipe opened on FD " << unlinkd_wfd); #if _SQUID_MSWIN_ diff --git a/src/url.cc b/src/url.cc index 5e6e1c23b9..10406196b2 100644 --- a/src/url.cc +++ b/src/url.cc @@ -232,7 +232,7 @@ urlParse(const HttpRequestMethod& method, char *url, HttpRequest *request) if ((l = strlen(url)) + Config.appendDomainLen > (MAX_URL - 1)) { /* terminate so it doesn't overflow other buffers */ *(url + (MAX_URL >> 1)) = '\0'; - debugs(23, 1, "urlParse: URL too large (" << l << " bytes)"); + debugs(23, DBG_IMPORTANT, "urlParse: URL too large (" << l << " bytes)"); return NULL; } if (method == METHOD_CONNECT) { @@ -382,7 +382,7 @@ urlParse(const HttpRequestMethod& method, char *url, HttpRequest *request) debugs(23, 3, "urlParse: Split URL '" << url << "' into proto='" << proto << "', host='" << host << "', port='" << port << "', path='" << urlpath << "'"); if (Config.onoff.check_hostnames && strspn(host, Config.onoff.allow_underscore ? valid_hostname_chars_u : valid_hostname_chars) != strlen(host)) { - debugs(23, 1, "urlParse: Illegal character in hostname '" << host << "'"); + debugs(23, DBG_IMPORTANT, "urlParse: Illegal character in hostname '" << host << "'"); return NULL; } @@ -396,7 +396,7 @@ urlParse(const HttpRequestMethod& method, char *url, HttpRequest *request) /* reject duplicate or leading dots */ if (strstr(host, "..") || *host == '.') { - debugs(23, 1, "urlParse: Illegal hostname '" << host << "'"); + debugs(23, DBG_IMPORTANT, "urlParse: Illegal hostname '" << host << "'"); return NULL; } diff --git a/src/urn.cc b/src/urn.cc index bcff6ce78d..a726acf91e 100644 --- a/src/urn.cc +++ b/src/urn.cc @@ -156,7 +156,7 @@ urnFindMinRtt(url_entry * urls, const HttpRequestMethod& m, int *rtt_ret) if (rtt_ret) *rtt_ret = min_rtt; - debugs(52, 1, "urnFindMinRtt: Returning '" << + debugs(52, DBG_IMPORTANT, "urnFindMinRtt: Returning '" << (min_u ? min_u->url : "NONE") << "' RTT " << min_rtt ); @@ -360,7 +360,7 @@ urnHandleReply(void *data, StoreIOBuffer result) k = headersEnd(buf, urnState->reqofs); if (0 == k) { - debugs(52, 1, "urnHandleReply: didn't find end-of-headers for " << e->url() ); + debugs(52, DBG_IMPORTANT, "urnHandleReply: didn't find end-of-headers for " << e->url() ); urnHandleReplyError(urnState, urlres_e); return; } diff --git a/src/wccp.cc b/src/wccp.cc index 013954d80c..aba668700a 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -162,7 +162,7 @@ wccpConnectionOpen(void) Comm::SetSelect(theWccpConnection, COMM_SELECT_READ, wccpHandleUdp, NULL, 0); - debugs(80, 1, "Accepting WCCPv1 messages on " << Config.Wccp.address << ", FD " << theWccpConnection << "."); + debugs(80, DBG_IMPORTANT, "Accepting WCCPv1 messages on " << Config.Wccp.address << ", FD " << theWccpConnection << "."); // Sadly WCCP only does IPv4 @@ -186,7 +186,7 @@ void wccpConnectionClose(void) { if (theWccpConnection > -1) { - debugs(80, 1, "FD " << theWccpConnection << " Closing WCCPv1 socket"); + debugs(80, DBG_IMPORTANT, "FD " << theWccpConnection << " Closing WCCPv1 socket"); comm_close(theWccpConnection); theWccpConnection = -1; } @@ -237,7 +237,7 @@ wccpHandleUdp(int sock, void *not_used) return; if (ntohl(wccp_i_see_you.number) > WCCP_ACTIVE_CACHES) { - debugs(80, 1, "Ignoring WCCP_I_SEE_YOU from " << + debugs(80, DBG_IMPORTANT, "Ignoring WCCP_I_SEE_YOU from " << from << " with number of caches set to " << (int) ntohl(wccp_i_see_you.number)); diff --git a/src/wccp2.cc b/src/wccp2.cc index 1ee2ac53af..c002744546 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -642,7 +642,7 @@ wccp2_check_security(struct wccp2_service_list_t *srv, char *security, char *pac /* Make sure the security type matches what we expect */ if (ntohl(ws->security_option) != srv->wccp2_security_type) { - debugs(80, 1, "wccp2_check_security: received packet has the wrong security option"); + debugs(80, DBG_IMPORTANT, "wccp2_check_security: received packet has the wrong security option"); return 0; } @@ -651,7 +651,7 @@ wccp2_check_security(struct wccp2_service_list_t *srv, char *security, char *pac } if (srv->wccp2_security_type != WCCP2_MD5_SECURITY) { - debugs(80, 1, "wccp2_check_security: invalid security option"); + debugs(80, DBG_IMPORTANT, "wccp2_check_security: invalid security option"); return 0; } @@ -1015,8 +1015,8 @@ wccp2ConnectionOpen(void) #endif Comm::SetSelect(theWccp2Connection, COMM_SELECT_READ, wccp2HandleUdp, NULL, 0); - debugs(80, 1, "Accepting WCCPv2 messages on port " << WCCP_PORT << ", FD " << theWccp2Connection << "."); - debugs(80, 1, "Initialising all WCCPv2 lists"); + debugs(80, DBG_IMPORTANT, "Accepting WCCPv2 messages on port " << WCCP_PORT << ", FD " << theWccp2Connection << "."); + debugs(80, DBG_IMPORTANT, "Initialising all WCCPv2 lists"); /* Initialise all routers on all services */ memset(&null, 0, sizeof(null)); @@ -1079,7 +1079,7 @@ wccp2ConnectionClose(void) } if (theWccp2Connection > -1) { - debugs(80, 1, "FD " << theWccp2Connection << " Closing WCCPv2 socket"); + debugs(80, DBG_IMPORTANT, "FD " << theWccp2Connection << " Closing WCCPv2 socket"); comm_close(theWccp2Connection); theWccp2Connection = -1; } @@ -1204,7 +1204,7 @@ wccp2HandleUdp(int sock, void *not_used) offset = 0; if (data_length > len) { - debugs(80, 1, "ERROR: Malformed WCCPv2 packet claiming it's bigger than received data"); + debugs(80, DBG_IMPORTANT, "ERROR: Malformed WCCPv2 packet claiming it's bigger than received data"); return; } @@ -1220,7 +1220,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_SECURITY_INFO: if (security_info != NULL) { - debugs(80, 1, "Duplicate security definition"); + debugs(80, DBG_IMPORTANT, "Duplicate security definition"); return; } @@ -1230,7 +1230,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_SERVICE_INFO: if (service_info != NULL) { - debugs(80, 1, "Duplicate service_info definition"); + debugs(80, DBG_IMPORTANT, "Duplicate service_info definition"); return; } @@ -1240,7 +1240,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_ROUTER_ID_INFO: if (router_identity_info != NULL) { - debugs(80, 1, "Duplicate router_identity_info definition"); + debugs(80, DBG_IMPORTANT, "Duplicate router_identity_info definition"); return; } @@ -1250,7 +1250,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_RTR_VIEW_INFO: if (router_view_header != NULL) { - debugs(80, 1, "Duplicate router_view definition"); + debugs(80, DBG_IMPORTANT, "Duplicate router_view definition"); return; } @@ -1260,7 +1260,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_CAPABILITY_INFO: if (router_capability_header != NULL) { - debugs(80, 1, "Duplicate router_capability definition"); + debugs(80, DBG_IMPORTANT, "Duplicate router_capability definition"); return; } @@ -1274,20 +1274,20 @@ wccp2HandleUdp(int sock, void *not_used) break; default: - debugs(80, 1, "Unknown record type in WCCPv2 Packet (" << ntohs(header->type) << ")."); + debugs(80, DBG_IMPORTANT, "Unknown record type in WCCPv2 Packet (" << ntohs(header->type) << ")."); } offset += sizeof(struct wccp2_item_header_t); offset += ntohs(header->length); if (offset > data_length) { - debugs(80, 1, "Error: WCCPv2 packet tried to tell us there is data beyond the end of the packet"); + debugs(80, DBG_IMPORTANT, "Error: WCCPv2 packet tried to tell us there is data beyond the end of the packet"); return; } } if ((security_info == NULL) || (service_info == NULL) || (router_identity_info == NULL) || (router_view_header == NULL)) { - debugs(80, 1, "Incomplete WCCPv2 Packet"); + debugs(80, DBG_IMPORTANT, "Incomplete WCCPv2 Packet"); return; } @@ -1305,17 +1305,17 @@ wccp2HandleUdp(int sock, void *not_used) } if (service_list_ptr == NULL) { - debugs(80, 1, "WCCPv2 Unknown service received from router (" << service_info->service_id << ")"); + debugs(80, DBG_IMPORTANT, "WCCPv2 Unknown service received from router (" << service_info->service_id << ")"); return; } if (ntohl(security_info->security_option) != ntohl(service_list_ptr->security_info->security_option)) { - debugs(80, 1, "Invalid security option in WCCPv2 Packet (" << ntohl(security_info->security_option) << " vs " << ntohl(service_list_ptr->security_info->security_option) << ")."); + debugs(80, DBG_IMPORTANT, "Invalid security option in WCCPv2 Packet (" << ntohl(security_info->security_option) << " vs " << ntohl(service_list_ptr->security_info->security_option) << ")."); return; } if (!wccp2_check_security(service_list_ptr, (char *) security_info, (char *) &wccp2_i_see_you, len)) { - debugs(80, 1, "Received WCCPv2 Packet failed authentication"); + debugs(80, DBG_IMPORTANT, "Received WCCPv2 Packet failed authentication"); return; } @@ -1326,7 +1326,7 @@ wccp2HandleUdp(int sock, void *not_used) } if (router_list_ptr->next == NULL) { - debugs(80, 1, "WCCPv2 Packet received from unknown router"); + debugs(80, DBG_IMPORTANT, "WCCPv2 Packet received from unknown router"); return; } @@ -1342,7 +1342,7 @@ wccp2HandleUdp(int sock, void *not_used) /* TODO: check return/forwarding methods */ if (router_capability_header == NULL) { if ((Config.Wccp2.return_method != WCCP2_PACKET_RETURN_METHOD_GRE) || (Config.Wccp2.forwarding_method != WCCP2_FORWARDING_METHOD_GRE)) { - debugs(80, 1, "wccp2HandleUdp: fatal error - A WCCP router does not support the forwarding method specified, only GRE supported"); + debugs(80, DBG_IMPORTANT, "wccp2HandleUdp: fatal error - A WCCP router does not support the forwarding method specified, only GRE supported"); wccp2ConnectionClose(); return; } @@ -1359,7 +1359,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_CAPABILITY_FORWARDING_METHOD: if (!(ntohl(router_capability_element->capability_value) & Config.Wccp2.forwarding_method)) { - debugs(80, 1, "wccp2HandleUdp: fatal error - A WCCP router has specified a different forwarding method " << ntohl(router_capability_element->capability_value) << ", expected " << Config.Wccp2.forwarding_method); + debugs(80, DBG_IMPORTANT, "wccp2HandleUdp: fatal error - A WCCP router has specified a different forwarding method " << ntohl(router_capability_element->capability_value) << ", expected " << Config.Wccp2.forwarding_method); wccp2ConnectionClose(); return; } @@ -1369,7 +1369,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_CAPABILITY_ASSIGNMENT_METHOD: if (!(ntohl(router_capability_element->capability_value) & Config.Wccp2.assignment_method)) { - debugs(80, 1, "wccp2HandleUdp: fatal error - A WCCP router has specified a different assignment method " << ntohl(router_capability_element->capability_value) << ", expected "<< Config.Wccp2.assignment_method); + debugs(80, DBG_IMPORTANT, "wccp2HandleUdp: fatal error - A WCCP router has specified a different assignment method " << ntohl(router_capability_element->capability_value) << ", expected "<< Config.Wccp2.assignment_method); wccp2ConnectionClose(); return; } @@ -1379,7 +1379,7 @@ wccp2HandleUdp(int sock, void *not_used) case WCCP2_CAPABILITY_RETURN_METHOD: if (!(ntohl(router_capability_element->capability_value) & Config.Wccp2.return_method)) { - debugs(80, 1, "wccp2HandleUdp: fatal error - A WCCP router has specified a different return method " << ntohl(router_capability_element->capability_value) << ", expected " << Config.Wccp2.return_method); + debugs(80, DBG_IMPORTANT, "wccp2HandleUdp: fatal error - A WCCP router has specified a different return method " << ntohl(router_capability_element->capability_value) << ", expected " << Config.Wccp2.return_method); wccp2ConnectionClose(); return; } @@ -1391,7 +1391,7 @@ wccp2HandleUdp(int sock, void *not_used) break; // ignore silently for now default: - debugs(80, 1, "Unknown capability type in WCCPv2 Packet (" << ntohs(router_capability_element->capability_type) << ")."); + debugs(80, DBG_IMPORTANT, "Unknown capability type in WCCPv2 Packet (" << ntohs(router_capability_element->capability_type) << ")."); } router_capability_element = (struct wccp2_capability_element_t *) (((char *) router_capability_element) + sizeof(struct wccp2_item_header_t) + ntohs(router_capability_element->capability_length)); @@ -1551,7 +1551,7 @@ wccp2HereIam(void *voidnotused) debugs(80, 6, "wccp2HereIam: Called"); if (wccp2_connected == 0) { - debugs(80, 1, "wccp2HereIam: wccp2 socket closed. Shutting down WCCP2"); + debugs(80, DBG_IMPORTANT, "wccp2HereIam: wccp2 socket closed. Shutting down WCCP2"); return; } @@ -2118,7 +2118,7 @@ parse_wccp2_service(void *v) char wccp_password[WCCP2_PASSWORD_LEN + 1]; if (wccp2_connected == 1) { - debugs(80, 1, "WCCPv2: Somehow reparsing the configuration without having shut down WCCP! Try reloading squid again."); + debugs(80, DBG_IMPORTANT, "WCCPv2: Somehow reparsing the configuration without having shut down WCCP! Try reloading squid again."); return; } @@ -2302,7 +2302,7 @@ parse_wccp2_service_info(void *v) int priority = -1; if (wccp2_connected == 1) { - debugs(80, 1, "WCCPv2: Somehow reparsing the configuration without having shut down WCCP! Try reloading squid again."); + debugs(80, DBG_IMPORTANT, "WCCPv2: Somehow reparsing the configuration without having shut down WCCP! Try reloading squid again."); return; } diff --git a/test-suite/debug.cc b/test-suite/debug.cc index 50f64dd3c0..8c8394dfd4 100644 --- a/test-suite/debug.cc +++ b/test-suite/debug.cc @@ -81,10 +81,10 @@ main(int argc, char **argv) if (true) debugs(1,9,"this won't compile if the macro is broken."); else - debugs(1,1,"bar"); + debugs(1, DBG_IMPORTANT,"bar"); StreamTest aStreamObject; StreamTest *streamPointer (&aStreamObject); - debugs(1,1,aStreamObject); - debugs(1,1,streamPointer->getAnInt() << " " << aStreamObject.getACString()); + debugs(1, DBG_IMPORTANT,aStreamObject); + debugs(1, DBG_IMPORTANT,streamPointer->getAnInt() << " " << aStreamObject.getACString()); return 0; } -- 2.47.2