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;
/* 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);
}
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;
/* 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);
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
* 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;
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;
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;
if (x < 0) {
ioCompleted();
errorOccured = true;
- debugs(79, 1, "storeDiskdSend CLOSE: " << xstrerror());
+ debugs(79, DBG_IMPORTANT, "storeDiskdSend CLOSE: " << xstrerror());
notifyClient();
ioRequestor = NULL;
return;
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;
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);
}
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);
++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)
* 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;
}
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;
}
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;
}
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;
}
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;
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");
}
}
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));
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");
}
}
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));
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);
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;
Must(inserted);
} else {
error_ = true;
- debugs(79,1, HERE << "error: no disker claimed " << dbName);
+ debugs(79, DBG_IMPORTANT, HERE << "error: no disker claimed " << dbName);
}
}
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);
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;
}
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<size_t>(written) != aRequest->len) {
- debugs(79,1, HERE << "problem: " << written << " < " << aRequest->len);
+ debugs(79, DBG_IMPORTANT, HERE << "problem: " << written << " < " << aRequest->len);
error_ = true;
}
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;
}
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;
/* 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) {
}
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;
}
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;
}
}
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) << "}");
}
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);
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;
}
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();
// 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;
}
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
}
++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 {
/* 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
}
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);
}
}
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();
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);
}
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 *
}
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;
break;
default:
- debugs(20, 1, "WARNING: got unused STORE_META type " << getType());
+ debugs(20, DBG_IMPORTANT, "WARNING: got unused STORE_META type " << getType());
break;
}
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;
}
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;
}
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"));
}
}
}
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;
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 << "] ...");
}
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:
if (!SetServiceStatus(svcHandle, &svcStatus)) {
status = GetLastError();
- debugs(1, 1, "SetServiceStatus error " << status);
+ debugs(1, DBG_IMPORTANT, "SetServiceStatus error " << status);
}
break;
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;
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;
}
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;
}
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");
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());
}
}
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;
}
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);
}
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;
}
}
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);
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);
}
}
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);
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;
}
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;
}
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) {
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 << "'.");
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:
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:
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
#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
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);
}
}
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();
}
if (!strncasecmp(unit, T_DECADE_STR, strlen(T_DECADE_STR)))
return static_cast<uint64_t>(86400 * 1000 * 365.2522 * 10);
- debugs(3, 1, "parseTimeUnits: unknown time unit '" << unit << "'");
+ debugs(3, DBG_IMPORTANT, "parseTimeUnits: unknown time unit '" << unit << "'");
return 0;
}
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;
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);
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 */
}
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");
}
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
}
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);
ConnStateData::sslCrtdHandleReply(const char * reply)
{
if (!reply) {
- debugs(1, 1, HERE << "\"ssl_crtd\" helper return <NULL> reply");
+ debugs(1, DBG_IMPORTANT, HERE << "\"ssl_crtd\" helper return <NULL> reply");
} else {
Ssl::CrtdMessage reply_message;
if (reply_message.parse(reply, strlen(reply)) != Ssl::CrtdMessage::OK) {
// 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 {
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;
}
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;
}
// 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 " : "") <<
{
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;
}
#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;
}
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;
/* 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;
}
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;
}
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;
}
{
#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;
}
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;
}
{
#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");
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 << "!!");
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;
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;
}
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
}
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;
}
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
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;
}
}
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)) {
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");
}
}
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");
}
}
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");
}
}
}
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");
}
}
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");
}
}
}
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;
}
}
/* 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;
}
}
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
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 << ")");
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) {
++ 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());
}
/*
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");
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);
}
}
fp = fopen(_PATH_RESCONF, "r");
if (fp == NULL) {
- debugs(78, 1, "" << _PATH_RESCONF << ": " << xstrerror());
+ debugs(78, DBG_IMPORTANT, "" << _PATH_RESCONF << ": " << xstrerror());
return;
}
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) {
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) {
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);
}
if (ndots < 1)
ndots = 1;
- debugs(78, 1, "Adding ndots " << ndots << " from " << _PATH_RESCONF);
+ debugs(78, DBG_IMPORTANT, "Adding ndots " << ndots << " from " << _PATH_RESCONF);
}
}
}
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);
}
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);
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);
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, ", ");
}
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, ", ");
}
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, ", ");
}
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, ", ");
}
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;
}
}
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;
}
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;
}
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;
}
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);
++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;
}
}
n = rfc1035MessageUnpack(buf, sz, &message);
if (message == NULL) {
- debugs(78, 1, "idnsGrokReply: Malformed DNS response");
+ debugs(78, DBG_IMPORTANT, "idnsGrokReply: Malformed DNS response");
return;
}
if (errno != ECONNREFUSED && errno != EHOSTUNREACH)
#endif
- debugs(50, 1, "idnsRead: FD " << fd << " recvfrom: " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "idnsRead: FD " << fd << " recvfrom: " << xstrerror());
break;
}
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;
}
*/
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);
}
}
#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");
}
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 */
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;
}
}
if (dynamic_cast<esiAttempt*>(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;
}
if (dynamic_cast<esiExcept*>(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;
}
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;
}
/* 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");
}
}
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) {
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) {
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;
}
}
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;
}
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;
}
/* Something wrong upstream */
return 1;
- /* debugs(86, 1, "?= " << srv.value.integral << " "); */
+ /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */
return 0;
/* Something wrong upstream */
return 1;
- /* debugs(86, 1, "?= " << srv.value.integral << " "); */
+ /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */
return 0;
/* Something wrong upstream */
return 1;
- /* debugs(86, 1, "?= " << srv.value.integral << " "); */
+ /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */
return 0;
/* Something wrong upstream */
return 1;
- /* debugs(86, 1, "?= " << srv.value.integral << " "); */
+ /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */
return 0;
}
/* Something wrong upstream */
return 1;
- /* debugs(86, 1, "?= " << srv.value.integral << " "); */
+ /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */
return 0;
}
/* 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 */
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);
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);
++t;
if (!*t) {
- debugs(86, 1, "missing end \' in '" << s << "'");
+ debugs(86, DBG_IMPORTANT, "missing end \' in '" << s << "'");
*endptr = origs;
} else {
*endptr = t + 1;
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) {
rv.precedence = 1;
rv.eval = evalexpr;
} else {
- debugs(86, 1, "invalid expr '" << s << "'");
+ debugs(86, DBG_IMPORTANT, "invalid expr '" << s << "'");
*endptr = origs;
}
/* cleanup candidate and stack */
dumpstack(stack, *stackdepth);
cleanmember(candidate);
- debugs(86, 1, "invalid expression");
+ debugs(86, DBG_IMPORTANT, "invalid expression");
return 0;
}
} else {
s = end;
} else {
assert (s == end);
- debugs(86, 1, "failed parsing expression");
+ debugs(86, DBG_IMPORTANT, "failed parsing expression");
PROF_stop(esiExpressionEval);
return 0;
}
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;
}
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);
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
} 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;
}
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;
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;
}
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);
}
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") <<
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;
}
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 << ")");
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);
f->flags.negcached = 1;
if (inbuf == NULL) {
- debugs(35, 1, "fqdncacheParse: Got <NULL> reply in response to '" << name << "'");
+ debugs(35, DBG_IMPORTANT, "fqdncacheParse: Got <NULL> reply in response to '" << name << "'");
f->error_message = xstrdup("Internal Error");
return -1;
}
token = strtok(buf, w_space);
if (NULL == token) {
- debugs(35, 1, "fqdncacheParse: Got <NULL>, expecting '$name' in response to '" << name << "'");
+ debugs(35, DBG_IMPORTANT, "fqdncacheParse: Got <NULL>, expecting '$name' in response to '" << name << "'");
f->error_message = xstrdup("Internal Error");
return -1;
}
}
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;
}
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;
}
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;
}
}
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;
}
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);
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.");
}
CossSwapDir::ioCompletedNotification()
{
if (theFile->error()) {
- debugs(47, 1, "" << path << ": " << xstrerror());
+ debugs(47, DBG_IMPORTANT, "" << path << ": " << xstrerror());
fatal("storeCossDirInit: Failed to open a COSS file.");
}
}
if (errflag > 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;
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;
}
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);
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;
* 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;
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.");
}
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);
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.");
}
const uint64_t size = static_cast<uint64_t>(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;
}
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! */
}
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;
}
}
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
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) {
}
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",
/* 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);
&hIpc);
if (pid < 0) {
- debugs(84, 1, "WARNING: Cannot run '" << progname << "' process.");
+ debugs(84, DBG_IMPORTANT, "WARNING: Cannot run '" << progname << "' process.");
continue;
}
/* 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);
&hIpc);
if (pid < 0) {
- debugs(84, 1, "WARNING: Cannot run '" << progname << "' process.");
+ debugs(84, DBG_IMPORTANT, "WARNING: Cannot run '" << progname << "' process.");
continue;
}
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);
}
}
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);
}
}
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 << "'");
}
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 << "'");
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 << "'");
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;
}
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;
}
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;
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;
}
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);
}
}
// 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;
}
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();
}
icmp_ident = getpid() & 0xffff;
- debugs(42, 1, "pinger: ICMP socket opened.");
+ debugs(42, DBG_IMPORTANT, "pinger: ICMP socket opened.");
return icmp_sock;
}
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);
}
icmp_ident = getpid() & 0xffff;
- debugs(42, 1, "pinger: ICMPv6 socket opened");
+ debugs(42, DBG_IMPORTANT, "pinger: ICMPv6 socket opened");
return icmp_sock;
}
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);
}
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;
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);
}
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 );
}
}
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? */
}
/** 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");
}
}
0);
if (n < 0 && EAGAIN != errno) {
- debugs(37, 1, HERE << "recv: " << xstrerror());
+ debugs(37, DBG_IMPORTANT, HERE << "recv: " << xstrerror());
if (errno == ECONNREFUSED)
Close();
break;
default:
- debugs(37, 1, HERE << "Bad opcode: " << preply.opcode << " from " << F);
+ debugs(37, DBG_IMPORTANT, HERE << "Bad opcode: " << preply.opcode << " from " << F);
break;
}
}
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)
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_
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;
}
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;
}
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);
xfree(buf);
getCurrentTime();
- debugs(38, 1, "NETDB state reloaded; " <<
+ debugs(38, DBG_IMPORTANT, "NETDB state reloaded; " <<
count << " entries, " <<
tvSubMsec(start, current_time) << " msec" );
}
break;
default:
- debugs(38, 1, "netdbExchangeHandleReply: corrupt data, aborting");
+ debugs(38, DBG_IMPORTANT, "netdbExchangeHandleReply: corrupt data, aborting");
netdbExchangeDone(ex);
return;
}
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;
}
if (errno != ECONNREFUSED && errno != EHOSTUNREACH)
#endif
- debugs(50, 1, "icpHandleUdp: FD " << sock << " recvfrom: " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "icpHandleUdp: FD " << sock << " recvfrom: " << xstrerror());
break;
}
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);
}
}
// 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;
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);
}
logsFlush();
if ((pid = fork()) < 0) {
- debugs(54, 1, "ipcCreate: fork: " << xstrerror());
+ debugs(54, DBG_IMPORTANT, "ipcCreate: fork: " << xstrerror());
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
#endif
default:
- debugs(54, 1, HERE << "Unhandled message type: " << message.type());
+ debugs(54, DBG_IMPORTANT, HERE << "Unhandled message type: " << message.type());
break;
}
}
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];
}
#endif
default:
- debugs(54, 1, HERE << "Unhandled message type: " << message.type());
+ debugs(54, DBG_IMPORTANT, HERE << "Unhandled message type: " << message.type());
break;
}
}
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);
}
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);
}
i->addrs.count = 0;
if (inbuf == NULL) {
- debugs(14, 1, "ipcacheParse: Got <NULL> reply");
+ debugs(14, DBG_IMPORTANT, "ipcacheParse: Got <NULL> reply");
i->error_message = xstrdup("Internal Error");
return -1;
}
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;
}
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;
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;
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;
}
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;
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;
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;
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;
}
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;
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);
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);
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;
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);
void
logfileRotate(Logfile * lf)
{
- debugs(50, 1, "logfileRotate: " << lf->path);
+ debugs(50, DBG_IMPORTANT, "logfileRotate: " << lf->path);
lf->f_rotate(lf);
}
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<l_daemon_t*>(xcalloc(1, sizeof(*ll)));
lf->data = ll;
ll->eol = 1;
logfile_mod_daemon_close(Logfile * lf)
{
l_daemon_t *ll = static_cast<l_daemon_t *>(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);
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';
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;
}
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
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
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);
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;
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
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());
/* 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());
}
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();
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();
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();
}
}
- 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
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";
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;
}
* 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);
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;
return;
if ((fp = fopen(filename, "r")) == NULL) {
- debugs(25, 1, "mimeInit: " << filename << ": " << xstrerror());
+ debugs(25, DBG_IMPORTANT, "mimeInit: " << filename << ": " << xstrerror());
return;
}
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;
}
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;
}
for (m = MimeTable; m != NULL; m = m->next)
m->theIcon.load();
- debugs(25, 1, "Loaded Icons.");
+ debugs(25, DBG_IMPORTANT, "Loaded Icons.");
}
void
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
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();
}
/* 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;
}
}
++ 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
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;
}
}
} 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) {
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;
-- 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;
}
}
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);
}
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;
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;
}
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!");
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);
/* 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);
}
if (psstate->acl_checklist) {
- debugs(44, 1, "calling aclChecklistFree() from peerSelectStateFree");
+ debugs(44, DBG_IMPORTANT, "calling aclChecklistFree() from peerSelectStateFree");
delete (psstate->acl_checklist);
}
#endif
else
- debugs(44, 1, "peerHandlePingReply: unknown protocol " << proto);
+ debugs(44, DBG_IMPORTANT, "peerHandlePingReply: unknown protocol " << proto);
}
static void
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";
}
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);
sndbuf[l] = '\0';
file_close(fd);
} else {
- debugs(50, 1, "send_announce: " << file << ": " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "send_announce: " << file << ": " << xstrerror());
}
}
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());
}
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());
}
}
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;
}
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;
}
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;
}
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();
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)) {
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;
}
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;
}
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;
/* 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;
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");
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
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;
}
}
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;
#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
*/
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,
if (e == NULL) {
/* done! */
- debugs(20, 1, "storeLateRelease: released " << n << " objects");
+ debugs(20, DBG_IMPORTANT, "storeLateRelease: released " << n << " objects");
return;
}
/* 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;
}
}
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 */
}
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;
}
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;
}
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;
}
}
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");
/* 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;
}
/* 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;
}
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");
}
}
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
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;
sd = dynamic_cast<SwapDir *>(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;
}
}
if ((++n & 0xFFFF) == 0) {
getCurrentTime();
- debugs(20, 1, " " << std::setw(7) << n <<
+ debugs(20, DBG_IMPORTANT, " " << std::setw(7) << n <<
" entries written so far.");
}
}
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).");
struct statvfs sfs;
if (statvfs(path, &sfs)) {
- debugs(50, 1, "" << path << ": " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror());
*blksize = 2048;
return 1;
}
struct statfs sfs;
if (statfs(path, &sfs)) {
- debugs(50, 1, "" << path << ": " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror());
*blksize = 2048;
return 1;
}
struct statvfs sfs;
if (statvfs(path, &sfs)) {
- debugs(50, 1, "" << path << ": " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror());
return 1;
}
struct statfs sfs;
if (statfs(path, &sfs)) {
- debugs(50, 1, "" << path << ": " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "" << path << ": " << xstrerror());
return 1;
}
/* 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);
++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);
}
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;
}
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);
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);
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;
}
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;
}
setuid(0);
if (setuid(uid) < 0)
- debugs(50, 1, "no_suid: setuid: " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "no_suid: setuid: " << xstrerror());
restoreCapabilities(0);
fp = fopen(Config.etcHostsPath, "r");
if (fp == NULL) {
- debugs(1, 1, "parseEtcHosts: " << Config.etcHostsPath << ": " << xstrerror());
+ debugs(1, DBG_IMPORTANT, "parseEtcHosts: " << Config.etcHostsPath << ": " << xstrerror());
return;
}
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;
}
{
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);
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);
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);
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_
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) {
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;
}
/* 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;
}
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 );
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;
}
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
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;
}
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));
/* 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;
}
}
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;
}
#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));
}
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;
}
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;
}
case WCCP2_SECURITY_INFO:
if (security_info != NULL) {
- debugs(80, 1, "Duplicate security definition");
+ debugs(80, DBG_IMPORTANT, "Duplicate security definition");
return;
}
case WCCP2_SERVICE_INFO:
if (service_info != NULL) {
- debugs(80, 1, "Duplicate service_info definition");
+ debugs(80, DBG_IMPORTANT, "Duplicate service_info definition");
return;
}
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;
}
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;
}
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;
}
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;
}
}
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;
}
}
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;
}
/* 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;
}
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;
}
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;
}
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;
}
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));
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;
}
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;
}
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;
}
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;
}