void ClientDelayConfig::parsePoolCount()
{
if (pools.size()) {
- debugs(3, 0, "parse_client_delay_pool_count: multiple client_delay_pools lines, aborting all previous client_delay_pools config");
+ debugs(3, DBG_CRITICAL, "parse_client_delay_pool_count: multiple client_delay_pools lines, aborting all previous client_delay_pools config");
clean();
}
unsigned short pools_;
ConfigParser::ParseUShort(&pool);
if (pool < 1 || pool > pools.size()) {
- debugs(3, 0, "parse_client_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << pools.size());
+ debugs(3, DBG_CRITICAL, "parse_client_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << pools.size());
return;
}
ConfigParser::ParseUShort(&pool);
if (pool < 1 || pool > pools.size()) {
- debugs(3, 0, "parse_client_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << pools.size());
+ debugs(3, DBG_CRITICAL, "parse_client_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << pools.size());
return;
}
*t = '\0';
if ((wordFile = fopen(fn, "r")) == NULL) {
- debugs(28, 0, "strtokFile: " << fn << " not found");
+ debugs(28, DBG_CRITICAL, "strtokFile: " << fn << " not found");
return (NULL);
}
ConfigParser::ParseUShort(&pool);
if (pool < 1 || pool > DelayPools::pools()) {
- debugs(3, 0, "parse_delay_pool_class: Ignoring pool " << pool << " not in 1 .. " << DelayPools::pools());
+ debugs(3, DBG_CRITICAL, "parse_delay_pool_class: Ignoring pool " << pool << " not in 1 .. " << DelayPools::pools());
return;
}
ConfigParser::ParseUShort(&delay_class_);
if (delay_class_ < 1 || delay_class_ > 5) {
- debugs(3, 0, "parse_delay_pool_class: Ignoring pool " << pool << " class " << delay_class_ << " not in 1 .. 5");
+ debugs(3, DBG_CRITICAL, "parse_delay_pool_class: Ignoring pool " << pool << " class " << delay_class_ << " not in 1 .. 5");
return;
}
ConfigParser::ParseUShort(&pool);
if (pool < 1 || pool > DelayPools::pools()) {
- debugs(3, 0, "parse_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << DelayPools::pools());
+ debugs(3, DBG_CRITICAL, "parse_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << DelayPools::pools());
return;
}
--pool;
if (!DelayPools::delay_data[pool].theComposite().getRaw()) {
- debugs(3, 0, "parse_delay_pool_rates: Ignoring pool " << pool + 1 << " attempt to set rates with class not set");
+ debugs(3, DBG_CRITICAL, "parse_delay_pool_rates: Ignoring pool " << pool + 1 << " attempt to set rates with class not set");
return;
}
ConfigParser::ParseUShort(&pool);
if (pool < 1 || pool > DelayPools::pools()) {
- debugs(3, 0, "parse_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << DelayPools::pools());
+ debugs(3, DBG_CRITICAL, "parse_delay_pool_rates: Ignoring pool " << pool << " not in 1 .. " << DelayPools::pools());
return;
}
writeRequest = NULL;
if (errflag) {
- debugs(79, 0, "storeUfsWriteDone: got failure (" << errflag << ")");
+ debugs(79, DBG_CRITICAL, "storeUfsWriteDone: got failure (" << errflag << ")");
doClose();
ioRequestor->writeCompleted (DISK_ERROR,0, result);
return;
smsgid = msgget((key_t) ikey, 0700 | IPC_CREAT);
if (smsgid < 0) {
- debugs(50, 0, "storeDiskdInit: msgget: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "storeDiskdInit: msgget: " << xstrerror());
fatal("msgget failed");
}
rmsgid = msgget((key_t) (ikey + 1), 0700 | IPC_CREAT);
if (rmsgid < 0) {
- debugs(50, 0, "storeDiskdInit: msgget: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "storeDiskdInit: msgget: " << xstrerror());
fatal("msgget failed");
}
nbufs * SHMBUF_BLKSZ, 0600 | IPC_CREAT);
if (id < 0) {
- debugs(50, 0, "storeDiskdInit: shmget: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "storeDiskdInit: shmget: " << xstrerror());
fatal("shmget failed");
}
buf = (char *)shmat(id, NULL, 0);
if (buf == (void *) -1) {
- debugs(50, 0, "storeDiskdInit: shmat: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "storeDiskdInit: shmat: " << xstrerror());
fatal("shmat failed");
}
if (errflag || fd < 0) {
errno = errflag;
- debugs(79, 0, "DiskThreadsDiskFile::openDone: " << xstrerror());
+ debugs(79, DBG_CRITICAL, "DiskThreadsDiskFile::openDone: " << xstrerror());
debugs(79, DBG_IMPORTANT, "\t" << path_);
errorOccured = true;
} else {
ioRequestor->closeCompleted();
return;
} else {
- debugs(79,0,HERE << "DiskThreadsDiskFile::close: " <<
+ debugs(79, DBG_CRITICAL, HERE << "DiskThreadsDiskFile::close: " <<
"did NOT close because ioInProgress() is true. now what?");
}
}
/* Warn if seriously overloaded */
if (request_queue_len > RIDICULOUS_LENGTH) {
- debugs(43, 0, "squidaio_queue_request: Async request queue growing uncontrollably!");
- debugs(43, 0, "squidaio_queue_request: Syncing pending I/O operations.. (blocking)");
+ debugs(43, DBG_CRITICAL, "squidaio_queue_request: Async request queue growing uncontrollably!");
+ debugs(43, DBG_CRITICAL, "squidaio_queue_request: Syncing pending I/O operations.. (blocking)");
squidaio_sync();
- debugs(43, 0, "squidaio_queue_request: Synced");
+ debugs(43, DBG_CRITICAL, "squidaio_queue_request: Synced");
}
} /* squidaio_queue_request */
/* Warn if seriously overloaded */
if (request_queue_len > RIDICULOUS_LENGTH) {
- debugs(43, 0, "squidaio_queue_request: Async request queue growing uncontrollably!");
- debugs(43, 0, "squidaio_queue_request: Syncing pending I/O operations.. (blocking)");
+ debugs(43, DBG_CRITICAL, "squidaio_queue_request: Async request queue growing uncontrollably!");
+ debugs(43, DBG_CRITICAL, "squidaio_queue_request: Syncing pending I/O operations.. (blocking)");
squidaio_sync();
- debugs(43, 0, "squidaio_queue_request: Synced");
+ debugs(43, DBG_CRITICAL, "squidaio_queue_request: Synced");
}
} /* squidaio_queue_request */
squidaio_do_close(squidaio_request_t * requestp)
{
if ((requestp->ret = close(requestp->fd)) < 0) {
- debugs(43, 0, "squidaio_do_close: FD " << requestp->fd << ", errno " << errno);
+ debugs(43, DBG_CRITICAL, "squidaio_do_close: FD " << requestp->fd << ", errno " << errno);
close(requestp->fd);
}
IpcIoFile::DiskerHandleRequest(const int workerId, IpcIoMsg &ipcIo)
{
if (ipcIo.command != IpcIo::cmdRead && ipcIo.command != IpcIo::cmdWrite) {
- debugs(0,0, HERE << "disker" << KidIdentifier <<
+ debugs(0, DBG_CRITICAL, HERE << "disker" << KidIdentifier <<
" should not receive " << ipcIo.command <<
" ipcIo" << workerId << '.' << ipcIo.requestId);
return;
if (TheFile < 0) {
const int xerrno = errno;
- debugs(47,0, HERE << "rock db error opening " << path << ": " <<
+ debugs(47, DBG_CRITICAL, HERE << "rock db error opening " << path << ": " <<
xstrerr(xerrno));
return false;
}
if (error) {
++errcount;
- debugs(1, 0, "Select loop Error. Retry " << errcount);
+ debugs(1, DBG_CRITICAL, "Select loop Error. Retry " << errcount);
} else
errcount = 0;
} else if (strncmp(token, "idle=", 5) == 0) {
n_idle = atoi(token + 5);
if (n_idle < 1) {
- debugs(0,0,"WARNING OVERIDE: Using idle=0 for helpers causes request failures. Overiding to use idle=1 instead.");
+ debugs(0, DBG_CRITICAL, "WARNING OVERIDE: Using idle=0 for helpers causes request failures. Overiding to use idle=1 instead.");
n_idle = 1;
}
} else if (strncmp(token, "concurrency=", 12) == 0) {
/* simple sanity. */
if (n_startup > n_max) {
- debugs(0,0,"WARNING OVERIDE: Capping startup=" << n_startup << " to the defined maximum (" << n_max <<")");
+ debugs(0, DBG_CRITICAL, "WARNING OVERIDE: Capping startup=" << n_startup << " to the defined maximum (" << n_max <<")");
n_startup = n_max;
}
if (n_idle > n_max) {
- debugs(0,0,"WARNING OVERIDE: Capping idle=" << n_idle << " to the defined maximum (" << n_max <<")");
+ debugs(0, DBG_CRITICAL, "WARNING OVERIDE: Capping idle=" << n_idle << " to the defined maximum (" << n_max <<")");
n_idle = n_max;
}
}
/* tmp hack to try to avoid coredumps */
if (e->id < 0 || e->id >= HDR_ENUM_END) {
- debugs(55, 0, "HttpHeader::clean BUG: entry[" << pos << "] is invalid (" << e->id << "). Ignored.");
+ debugs(55, DBG_CRITICAL, "HttpHeader::clean BUG: entry[" << pos << "] is invalid (" << e->id << "). Ignored.");
} else {
HttpHeaderStats[owner].fieldTypeDistr.count(e->id);
/* yes, this deletion leaves us in an inconsistent state */
{
/* VOID is reserved, and new types have to be added as classes */
if (type <= STORE_META_VOID || type >= STORE_META_END + 10) {
- debugs(20, 0, "storeSwapMetaUnpack: bad type (" << type << ")!");
+ debugs(20, DBG_CRITICAL, "storeSwapMetaUnpack: bad type (" << type << ")!");
return false;
}
type == STORE_META_KEY_SHA ||
type == STORE_META_HITMETERING ||
type == STORE_META_VALID) {
- debugs(20, 0, "Obsolete and unused type (" << type << ") in disk metadata");
+ debugs(20, DBG_CRITICAL, "Obsolete and unused type (" << type << ") in disk metadata");
return false;
}
StoreMeta::validLength(int aLength) const
{
if (!IntRange (MinimumTLVLength, MaximumTLVLength).includes(aLength)) {
- debugs(20, 0, "storeSwapMetaUnpack: insane length (" << aLength << ")!");
+ debugs(20, DBG_CRITICAL, "storeSwapMetaUnpack: insane length (" << aLength << ")!");
return false;
}
break;
default:
- debugs(20, 0, "Attempt to create unknown concrete StoreMeta");
+ debugs(20, DBG_CRITICAL, "Attempt to create unknown concrete StoreMeta");
return NULL;
}
getLength();
if (position + length > *hdr_len) {
- debugs(20, 0, "storeSwapMetaUnpack: overflow!");
- debugs(20, 0, "\ttype=" << type << ", length=" << length << ", *hdr_len=" << *hdr_len << ", offset=" << position);
+ debugs(20, DBG_CRITICAL, "storeSwapMetaUnpack: overflow!");
+ debugs(20, DBG_CRITICAL, "\ttype=" << type << ", length=" << length << ", *hdr_len=" << *hdr_len << ", offset=" << position);
return false;
}
/* snarf the ACL name */
if ((t = strtok(NULL, w_space)) == NULL) {
- debugs(28, 0, "aclParseAclLine: missing ACL name.");
+ debugs(28, DBG_CRITICAL, "aclParseAclLine: missing ACL name.");
parser.destruct();
return;
}
if (strlen(t) >= ACL_NAME_SZ) {
- debugs(28, 0, "aclParseAclLine: aclParseAclLine: ACL name '" << t <<
+ debugs(28, DBG_CRITICAL, "aclParseAclLine: aclParseAclLine: ACL name '" << t <<
"' too long, max " << ACL_NAME_SZ - 1 << " characters supported");
parser.destruct();
return;
const char *theType;
if ((theType = strtok(NULL, w_space)) == NULL) {
- debugs(28, 0, "aclParseAclLine: missing ACL type.");
+ debugs(28, DBG_CRITICAL, "aclParseAclLine: missing ACL type.");
parser.destruct();
return;
}
new_acl = 1;
} else {
if (strcmp (A->typeString(),theType) ) {
- debugs(28, 0, "aclParseAclLine: ACL '" << A->name << "' already exists with different type.");
+ debugs(28, DBG_CRITICAL, "aclParseAclLine: ACL '" << A->name << "' already exists with different type.");
parser.destruct();
return;
}
return;
if (A->empty()) {
- debugs(28, 0, "Warning: empty ACL: " << A->cfgline);
+ debugs(28, DBG_CRITICAL, "Warning: empty ACL: " << A->cfgline);
}
if (!A->valid()) {
debugs(28, 5, "aclParseArpData: " << t);
if (sscanf(t, "%[0-9a-fA-F:]", buf) != 1) {
- debugs(28, 0, "aclParseArpData: Bad ethernet address: '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclParseArpData: Bad ethernet address: '" << t << "'");
safe_free(q);
return NULL;
}
if (!q->decode(buf)) {
- debugs(28, 0, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, 0, "aclParseArpData: Ignoring invalid ARP acl entry: can't parse '" << buf << "'");
+ debugs(28, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(28, DBG_CRITICAL, "aclParseArpData: Ignoring invalid ARP acl entry: can't parse '" << buf << "'");
safe_free(q);
return NULL;
}
debugs(28, 5, "aclParseEuiData: " << t);
if (sscanf(t, "%[0-9a-fA-F:]", buf) != 1) {
- debugs(28, 0, "aclParseEuiData: Bad EUI-64 address: '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclParseEuiData: Bad EUI-64 address: '" << t << "'");
safe_free(q);
return NULL;
}
if (!q->decode(buf)) {
- debugs(28, 0, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, 0, "aclParseEuiData: Ignoring invalid EUI-64 acl entry: can't parse '" << buf << "'");
+ debugs(28, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(28, DBG_CRITICAL, "aclParseEuiData: Ignoring invalid EUI-64 acl entry: can't parse '" << buf << "'");
safe_free(q);
return NULL;
}
/* first expect a page name */
if ((t = strtok(NULL, w_space)) == NULL) {
- debugs(28, 0, "aclParseDenyInfoLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, 0, "aclParseDenyInfoLine: missing 'error page' parameter.");
+ debugs(28, DBG_CRITICAL, "aclParseDenyInfoLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(28, DBG_CRITICAL, "aclParseDenyInfoLine: missing 'error page' parameter.");
return;
}
}
if (A->acl_list == NULL) {
- debugs(28, 0, "aclParseDenyInfoLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, 0, "aclParseDenyInfoLine: deny_info line contains no ACL's, skipping");
+ debugs(28, DBG_CRITICAL, "aclParseDenyInfoLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(28, DBG_CRITICAL, "aclParseDenyInfoLine: deny_info line contains no ACL's, skipping");
memFree(A, MEM_ACL_DENY_INFO_LIST);
return;
}
/* first expect either 'allow' or 'deny' */
if ((t = strtok(NULL, w_space)) == NULL) {
- debugs(28, 0, "aclParseAccessLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, 0, "aclParseAccessLine: missing 'allow' or 'deny'.");
+ debugs(28, DBG_CRITICAL, "aclParseAccessLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(28, DBG_CRITICAL, "aclParseAccessLine: missing 'allow' or 'deny'.");
return;
}
else if (!strcmp(t, "deny"))
A->allow = ACCESS_DENIED;
else {
- debugs(28, 0, "aclParseAccessLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, 0, "aclParseAccessLine: expecting 'allow' or 'deny', got '" << t << "'.");
+ debugs(28, DBG_CRITICAL, "aclParseAccessLine: " << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(28, DBG_CRITICAL, "aclParseAccessLine: expecting 'allow' or 'deny', got '" << t << "'.");
delete A;
return;
}
aclParseAclList(parser, &A->aclList);
if (A->aclList == NULL) {
- debugs(28, 0, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, 0, "aclParseAccessLine: Access line contains no ACL's, skipping");
+ debugs(28, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(28, DBG_CRITICAL, "aclParseAccessLine: Access line contains no ACL's, skipping");
delete A;
return;
}
a = ACL::FindByName(t);
if (a == NULL) {
- debugs(28, 0, "aclParseAclList: ACL name '" << t << "' not found.");
+ debugs(28, DBG_CRITICAL, "aclParseAclList: ACL name '" << t << "' not found.");
delete L;
parser.destruct();
continue;
char bufb[8];
a->toStr(bufa, sizeof(bufa));
b->toStr(bufb, sizeof(bufb));
- debugs(28, 0, "WARNING: '" << bufa << "' is a subrange of '" << bufb << "'");
- debugs(28, 0, "WARNING: because of this '" << bufa << "' is ignored to keep splay tree searching predictable");
- debugs(28, 0, "WARNING: You should probably remove '" << bufb << "' from the ACL named '" << AclMatchedName << "'");
+ debugs(28, DBG_CRITICAL, "WARNING: '" << bufa << "' is a subrange of '" << bufb << "'");
+ debugs(28, DBG_CRITICAL, "WARNING: because of this '" << bufa << "' is ignored to keep splay tree searching predictable");
+ debugs(28, DBG_CRITICAL, "WARNING: You should probably remove '" << bufb << "' from the ACL named '" << AclMatchedName << "'");
}
return ret;
temp.end = port2+1;
ranges.push_back(temp);
} else {
- debugs(28, 0, "ACLIntRange::parse: Invalid port value");
+ debugs(28, DBG_CRITICAL, "ACLIntRange::parse: Invalid port value");
self_destruct();
}
}
a->toStr(buf_n1, 3*(MAX_IPSTRLEN+1));
b->toStr(buf_n2, 3*(MAX_IPSTRLEN+1));
}
- debugs(28, 0, "WARNING: (" << (bina?'B':'A') << ") '" << buf_n1 << "' is a subnetwork of (" << (bina?'A':'B') << ") '" << buf_n2 << "'");
- debugs(28, 0, "WARNING: because of this '" << (bina?buf_n2:buf_n1) << "' is ignored to keep splay tree searching predictable");
- debugs(28, 0, "WARNING: You should probably remove '" << buf_n1 << "' from the ACL named '" << AclMatchedName << "'");
+ debugs(28, DBG_CRITICAL, "WARNING: (" << (bina?'B':'A') << ") '" << buf_n1 << "' is a subnetwork of (" << (bina?'A':'B') << ") '" << buf_n2 << "'");
+ debugs(28, DBG_CRITICAL, "WARNING: because of this '" << (bina?buf_n2:buf_n1) << "' is ignored to keep splay tree searching predictable");
+ debugs(28, DBG_CRITICAL, "WARNING: You should probably remove '" << buf_n1 << "' from the ACL named '" << AclMatchedName << "'");
}
return ret;
int errcode = getaddrinfo(addr1,NULL,&hints,&hp);
if (hp == NULL) {
- debugs(28, 0, "aclIpParseIpData: Bad host/IP: '" << addr1 <<
+ debugs(28, DBG_CRITICAL, "aclIpParseIpData: Bad host/IP: '" << addr1 <<
"' in '" << t << "', flags=" << hints.ai_flags <<
" : (" << errcode << ") " << gai_strerror(errcode) );
self_destruct();
}
if (*Q != NULL) {
- debugs(28, 0, "aclIpParseIpData: Bad host/IP: '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclIpParseIpData: Bad host/IP: '" << t << "'");
self_destruct();
return NULL;
}
/* Decode addr1 */
if (!*addr1 || !(q->addr1 = addr1)) {
- debugs(28, 0, "aclIpParseIpData: unknown first address in '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclIpParseIpData: unknown first address in '" << t << "'");
delete q;
self_destruct();
return NULL;
if (!*addr2)
q->addr2.SetAnyAddr();
else if (!(q->addr2=addr2) ) {
- debugs(28, 0, "aclIpParseIpData: unknown second address in '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclIpParseIpData: unknown second address in '" << t << "'");
delete q;
self_destruct();
return NULL;
/* Decode mask (NULL or empty means a exact host mask) */
if (!DecodeMask(mask, q->mask, iptype)) {
- debugs(28, 0, "aclParseIpData: unknown netmask '" << mask << "' in '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclParseIpData: unknown netmask '" << mask << "' in '" << t << "'");
delete q;
self_destruct();
return NULL;
changed += q->addr2.ApplyMask(q->mask);
if (changed)
- debugs(28, 0, "aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in '" << t << "'");
debugs(28,9, HERE << "Parsed: " << q->addr1 << "-" << q->addr2 << "/" << q->mask << "(/" << q->mask.GetCIDR() <<")");
if (0 != Config.onoff.client_db)
return;
- debugs(22, 0, "WARNING: 'maxconn' ACL (" << name << ") won't work with client_db disabled");
+ debugs(22, DBG_CRITICAL, "WARNING: 'maxconn' ACL (" << name << ") won't work with client_db disabled");
}
int a = xatoi(bufa);
int b = xatoi(bufb);
if (a == 0 || b == 0) {
- debugs(28, 0, "aclParseRandomData: Bad Pattern: '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclParseRandomData: Bad Pattern: '" << t << "'");
self_destruct();
} else
data = a / (double)(a+b);
int a = xatoi(bufa);
int b = xatoi(bufb);
if (a == 0 || b == 0) {
- debugs(28, 0, "aclParseRandomData: Bad Pattern: '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclParseRandomData: Bad Pattern: '" << t << "'");
self_destruct();
} else
data = (double) a / (double) b;
} else if (sscanf(t, "0.%[0-9]", bufa) == 1) {
data = atof(t);
} else {
- debugs(28, 0, "aclParseRandomData: Bad Pattern: '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclParseRandomData: Bad Pattern: '" << t << "'");
self_destruct();
}
break;
default:
- debugs(28, 0, "" << cfg_filename << " line " << config_lineno <<
+ debugs(28, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno <<
": " << config_input_line);
- debugs(28, 0, "aclParseTimeSpec: Bad Day '" << *t << "'" );
+ debugs(28, DBG_CRITICAL, "aclParseTimeSpec: Bad Day '" << *t << "'" );
break;
}
}
/* assume its time-of-day spec */
if ((sscanf(t, "%d:%d-%d:%d", &h1, &m1, &h2, &m2) < 4) || (!((h1 >= 0 && h1 < 24) && ((h2 >= 0 && h2 < 24) || (h2 == 24 && m2 == 0)) && (m1 >= 0 && m1 < 60) && (m2 >= 0 && m2 < 60)))) {
- debugs(28, 0, "aclParseTimeSpec: Bad time range '" << t << "'");
+ debugs(28, DBG_CRITICAL, "aclParseTimeSpec: Bad time range '" << t << "'");
self_destruct();
if (q != this)
parsed_weekbits = 0;
if (q->start > q->stop) {
- debugs(28, 0, "aclParseTimeSpec: Reversed time range");
+ debugs(28, DBG_CRITICAL, "aclParseTimeSpec: Reversed time range");
self_destruct();
if (q != this)
}
if (!group()) {
- debugs(93,0, "ERROR: Unknown adaptation service or group name: '" <<
+ debugs(93, DBG_CRITICAL, "ERROR: Unknown adaptation service or group name: '" <<
groupId << "'"); // TODO: fail on failures
}
}
for (VISCI i = configs.begin(); i != configs.end(); ++i) {
const ServiceConfigPointer cfg = *i;
if (FindService(cfg->key) != NULL) {
- debugs(93,0, "ERROR: Duplicate adaptation service name: " <<
+ debugs(93, DBG_CRITICAL, "ERROR: Duplicate adaptation service name: " <<
cfg->key);
continue; // TODO: make fatal
}
// AYJ: most of this is duplicate of urlParse() in src/url.cc
if (!value || !*value) {
- debugs(3, 0, HERE << cfg_filename << ':' << config_lineno << ": " <<
+ debugs(3, DBG_CRITICAL, HERE << cfg_filename << ':' << config_lineno << ": " <<
"empty adaptation service URI");
return false;
}
len = e - s;
if (len > 1024) {
- debugs(3, 0, HERE << cfg_filename << ':' << config_lineno << ": " <<
+ debugs(3, DBG_CRITICAL, HERE << cfg_filename << ':' << config_lineno << ": " <<
"long resource name (>1024), probably wrong");
}
else if (!strcmp(value, "1") || !strcmp(value, "on"))
var = true;
else {
- debugs(3, 0, HERE << cfg_filename << ':' << config_lineno << ": " <<
+ debugs(3, DBG_CRITICAL, HERE << cfg_filename << ':' << config_lineno << ": " <<
"wrong value for boolean " << name << "; " <<
"'0', '1', 'on', or 'off' expected but got: " << value);
return false;
baselineKey = service->cfg().key;
baselineBypass = service->cfg().bypass;
} else if (baselineBypass != service->cfg().bypass) {
- debugs(93,0, "WARNING: Inconsistent bypass in " << kind <<
+ debugs(93, DBG_CRITICAL, "WARNING: Inconsistent bypass in " << kind <<
' ' << id << " may produce surprising results: " <<
baselineKey << " vs. " << serviceId);
}
ACLProxyAuth::valid () const
{
if (authenticateSchemeCount() == 0) {
- debugs(28, 0, "Can't use proxy auth because no authentication schemes were compiled.");
+ debugs(28, DBG_CRITICAL, "Can't use proxy auth because no authentication schemes were compiled.");
return false;
}
if (authenticateActiveSchemeCount() == 0) {
- debugs(28, 0, "Can't use proxy auth because no authentication schemes are fully configured.");
+ debugs(28, DBG_CRITICAL, "Can't use proxy auth because no authentication schemes are fully configured.");
return false;
}
} else if (strcasecmp(param_str, "utf8") == 0) {
parse_onoff(&utf8);
} else {
- debugs(29, 0, "unrecognised digest auth scheme parameter '" << param_str << "'");
+ debugs(29, DBG_CRITICAL, "unrecognised digest auth scheme parameter '" << param_str << "'");
}
}
if (tmp_line_len >= 9 && strncmp(tmp_line, "include", 7) == 0 && xisspace(tmp_line[7])) {
err_count += parseManyConfigFiles(tmp_line + 8, depth + 1);
} else if (!parse_line(tmp_line)) {
- debugs(3, 0, HERE << cfg_filename << ":" << config_lineno << " unrecognized: '" << tmp_line << "'");
+ debugs(3, DBG_CRITICAL, HERE << cfg_filename << ":" << config_lineno << " unrecognized: '" << tmp_line << "'");
++err_count;
}
}
#if SIZEOF_OFF_T <= 4
if (Config.Store.maxObjectSize > 0x7FFF0000) {
- debugs(3, 0, "WARNING: This Squid binary can not handle files larger than 2GB. Limiting maximum_object_size to just below 2GB");
+ debugs(3, DBG_CRITICAL, "WARNING: This Squid binary can not handle files larger than 2GB. Limiting maximum_object_size to just below 2GB");
Config.Store.maxObjectSize = 0x7FFF0000;
}
#endif
(void) 0;
else if (Store::Root().maxSize() < Config.memMaxSize)
/* This is bogus. folk with NULL caches will want this */
- debugs(3, 0, "WARNING cache_mem is larger than total disk cache space!");
+ debugs(3, DBG_CRITICAL, "WARNING cache_mem is larger than total disk cache space!");
if (Config.Announce.period > 0) {
Config.onoff.announce = 1;
if (0 == d)
(void) 0;
else if ((token = strtok(NULL, w_space)) == NULL)
- debugs(3, 0, "WARNING: No units on '" <<
+ debugs(3, DBG_CRITICAL, "WARNING: No units on '" <<
config_input_line << "', assuming " <<
d << " " << units );
else if ((m = parseTimeUnits(token, allowMsec)) == 0)
if (0.0 == d)
(void) 0;
else if ((token = strtok(NULL, w_space)) == NULL)
- debugs(3, 0, "WARNING: No units on '" <<
+ debugs(3, DBG_CRITICAL, "WARNING: No units on '" <<
config_input_line << "', assuming " <<
d << " " << units );
else if ((m = parseBytesUnits(token)) == 0) {
if (0.0 == d)
(void) 0;
else if ((token = strtok(NULL, w_space)) == NULL)
- debugs(3, 0, "WARNING: No units on '" <<
+ debugs(3, DBG_CRITICAL, "WARNING: No units on '" <<
config_input_line << "', assuming " <<
d << " " << units );
else if ((m = parseBytesUnits(token)) == 0) {
if (0.0 == d)
(void) 0;
else if ((token = strtok(NULL, w_space)) == NULL)
- debugs(3, 0, "WARNING: No units on '" <<
+ debugs(3, DBG_CRITICAL, "WARNING: No units on '" <<
config_input_line << "', assuming " <<
d << " " << units );
else if ((m = parseBytesUnits(token)) == 0) {
char *t = NULL;
if ((t = strtok(NULL, w_space)) == NULL) {
- debugs(3, 0, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(3, 0, "parse_http_header_access: missing header name.");
+ debugs(3, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(3, DBG_CRITICAL, "parse_http_header_access: missing header name.");
return;
}
char *t = NULL;
if ((t = strtok(NULL, w_space)) == NULL) {
- debugs(3, 0, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(3, 0, "parse_http_header_replace: missing header name.");
+ debugs(3, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(3, DBG_CRITICAL, "parse_http_header_replace: missing header name.");
return;
}
sd = dynamic_cast<SwapDir *>(swap->swapDirs[i].getRaw());
if (strcmp(sd->type(), StoreFileSystem::FileSystems().items[fs]->type()) != 0) {
- debugs(3, 0, "ERROR: Can't change type of existing cache_dir " <<
+ debugs(3, DBG_CRITICAL, "ERROR: Can't change type of existing cache_dir " <<
sd->type() << " " << sd->path << " to " << type_str << ". Restart required");
return;
}
} else if (strcmp(token, "connection-auth=auto") == 0) {
p->connection_auth = 2;
} else {
- debugs(3, 0, "parse_peer: token='" << token << "'");
+ debugs(3, DBG_CRITICAL, "parse_peer: token='" << token << "'");
self_destruct();
}
}
if (strcmp(w->key, u->key))
continue;
- debugs(0, 0, "WARNING: action '" << u->key << "' (line " << config_lineno << ") already has a password");
+ debugs(0, DBG_CRITICAL, "WARNING: action '" << u->key << "' (line " << config_lineno << ") already has a password");
}
}
}
self_destruct();
if ((p = peerFindByName(host)) == NULL) {
- debugs(15, 0, "" << cfg_filename << ", line " << config_lineno << ": No cache_peer '" << host << "'");
+ debugs(15, DBG_CRITICAL, "" << cfg_filename << ", line " << config_lineno << ": No cache_peer '" << host << "'");
return;
}
peer *p;
if ((p = peerFindByName(host)) == NULL) {
- debugs(15, 0, "" << cfg_filename << ", line " << config_lineno << ": No cache_peer '" << host << "'");
+ debugs(15, DBG_CRITICAL, "" << cfg_filename << ", line " << config_lineno << ": No cache_peer '" << host << "'");
continue;
}
peer *p;
if ((p = peerFindByName(host)) == NULL) {
- debugs(15, 0, "" << cfg_filename << ", line " << config_lineno << ": No cache_peer '" << host << "'");
+ debugs(15, DBG_CRITICAL, "" << cfg_filename << ", line " << config_lineno << ": No cache_peer '" << host << "'");
return;
}
#endif
} else
- debugs(22, 0, "refreshAddToList: Unknown option '" << pattern << "': " << token);
+ debugs(22, DBG_CRITICAL, "refreshAddToList: Unknown option '" << pattern << "': " << token);
}
if ((errcode = regcomp(&comp, pattern, flags)) != 0) {
char errbuf[256];
regerror(errcode, &comp, errbuf, sizeof errbuf);
- debugs(22, 0, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(22, 0, "refreshAddToList: Invalid regular expression '" << pattern << "': " << errbuf);
+ debugs(22, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
+ debugs(22, DBG_CRITICAL, "refreshAddToList: Invalid regular expression '" << pattern << "': " << errbuf);
return;
}
if (!strcasecmp(s, "multicast"))
return PEER_MULTICAST;
- debugs(15, 0, "WARNING: Unknown neighbor type: " << s);
+ debugs(15, DBG_CRITICAL, "WARNING: Unknown neighbor type: " << s);
return PEER_SIBLING;
}
cl->type = Log::Format::CLF_CUSTOM;
cl->logFormat = lf;
} else if (strcmp(logdef_name, "auto") == 0) {
- debugs(0,0, "WARNING: Log format 'auto' no longer exists. Using 'squid' instead.");
+ debugs(0, DBG_CRITICAL, "WARNING: Log format 'auto' no longer exists. Using 'squid' instead.");
cl->type = Log::Format::CLF_SQUID;
} else if (strcmp(logdef_name, "squid") == 0) {
cl->type = Log::Format::CLF_SQUID;
} else if (strcmp(logdef_name, "referrer") == 0) {
cl->type = Log::Format::CLF_REFERER;
} else {
- debugs(3, 0, "Log format '" << logdef_name << "' is not defined");
+ debugs(3, DBG_CRITICAL, "Log format '" << logdef_name << "' is not defined");
self_destruct();
return;
}
static void
parse_icap_class_type()
{
- debugs(93, 0, "WARNING: 'icap_class' is depricated. " <<
+ debugs(93, DBG_CRITICAL, "WARNING: 'icap_class' is depricated. " <<
"Use 'adaptation_service_set' instead");
Adaptation::Config::ParseServiceSet();
}
static void
parse_icap_access_type()
{
- debugs(93, 0, "WARNING: 'icap_access' is depricated. " <<
+ debugs(93, DBG_CRITICAL, "WARNING: 'icap_access' is depricated. " <<
"Use 'adaptation_access' instead");
Adaptation::Config::ParseAccess(LegacyParser);
}
return;
if (strcmp(token,"in") != 0) {
- debugs(3, 0, "expecting 'in' on'" << config_input_line << "'");
+ debugs(3, DBG_CRITICAL, "expecting 'in' on'" << config_input_line << "'");
self_destruct();
}
if (0 == d)
(void) 0;
else if ((token = strtok(NULL, w_space)) == NULL) {
- debugs(3, 0, "No time-units on '" << config_input_line << "'");
+ debugs(3, DBG_CRITICAL, "No time-units on '" << config_input_line << "'");
self_destruct();
} else if ((m = parseTimeUnits(token, false)) == 0)
self_destruct();
if (p < 95.0)
return 0;
- debugs(1, 0, "WARNING: Probable misconfigured neighbor at " << key);
+ debugs(1, DBG_CRITICAL, "WARNING: Probable misconfigured neighbor at " << key);
- debugs(1, 0, "WARNING: " << ND << " of the last " << NR <<
+ debugs(1, DBG_CRITICAL, "WARNING: " << ND << " of the last " << NR <<
" ICP replies are DENIED");
- debugs(1, 0, "WARNING: No replies will be sent for the next " <<
+ debugs(1, DBG_CRITICAL, "WARNING: No replies will be sent for the next " <<
CUTOFF_SECONDS << " seconds");
c->cutoff.time = squid_curtime;
/* Register with storage manager to receive updates when data comes in. */
if (EBIT_TEST(entry->flags, ENTRY_ABORTED))
- debugs(88, 0, "clientReplyContext::processExpired: Found ENTRY_ABORTED object");
+ debugs(88, DBG_CRITICAL, "clientReplyContext::processExpired: Found ENTRY_ABORTED object");
{
/* start counting the length from 0 */
*/
if (http->storeEntry()) {
if (EBIT_TEST(http->storeEntry()->flags, ENTRY_SPECIAL)) {
- debugs(88, 0, "clientProcessMiss: miss on a special object (" << url << ").");
- debugs(88, 0, "\tlog_type = " << Format::log_tags[http->logType]);
+ debugs(88, DBG_CRITICAL, "clientProcessMiss: miss on a special object (" << url << ").");
+ debugs(88, DBG_CRITICAL, "\tlog_type = " << Format::log_tags[http->logType]);
http->storeEntry()->dump(1);
}
Comm::Connection::~Connection()
{
if (fd >= 0) {
- debugs(5, 0, "BUG: Orphan Comm::Connection: " << *this);
- debugs(5, 0, "NOTE: " << ++lost_conn << " Orphans since last started.");
+ debugs(5, DBG_CRITICAL, "BUG: Orphan Comm::Connection: " << *this);
+ debugs(5, DBG_CRITICAL, "NOTE: " << ++lost_conn << " Orphans since last started.");
close();
}
if (ignoreErrno(errno))
continue;
- debugs(5, 0, "comm_poll: poll failure: " << xstrerror());
+ debugs(5, DBG_CRITICAL, "comm_poll: poll failure: " << xstrerror());
assert(errno != EINVAL);
if (revents & POLLNVAL) {
AsyncCall::Pointer ch;
- debugs(5, 0, "WARNING: FD " << fd << " has handlers, but it's invalid.");
- debugs(5, 0, "FD " << fd << " is a " << fdTypeStr[F->type]);
- debugs(5, 0, "--> " << F->desc);
- debugs(5, 0, "tmout:" << F->timeoutHandler << "read:" <<
+ debugs(5, DBG_CRITICAL, "WARNING: FD " << fd << " has handlers, but it's invalid.");
+ debugs(5, DBG_CRITICAL, "FD " << fd << " is a " << fdTypeStr[F->type]);
+ debugs(5, DBG_CRITICAL, "--> " << F->desc);
+ debugs(5, DBG_CRITICAL, "tmout:" << F->timeoutHandler << "read:" <<
F->read_handler << " write:" << F->write_handler);
for (ch = F->closeHandler; ch != NULL; ch = ch->Next())
- debugs(5, 0, " close handler: " << ch);
+ debugs(5, DBG_CRITICAL, " close handler: " << ch);
if (F->closeHandler != NULL) {
commCallCloseHandlers(fd);
} else if (F->timeoutHandler != NULL) {
- debugs(5, 0, "comm_poll: Calling Timeout Handler");
+ debugs(5, DBG_CRITICAL, "comm_poll: Calling Timeout Handler");
ScheduleCallHere(F->timeoutHandler);
}
if (ignoreErrno(errno))
break;
- debugs(5, 0, "comm_select: select failure: " << xstrerror());
+ debugs(5, DBG_CRITICAL, "comm_select: select failure: " << xstrerror());
examine_select(&readfds, &writefds);
fde *F = NULL;
struct stat sb;
- debugs(5, 0, "examine_select: Examining open file descriptors...");
+ debugs(5, DBG_CRITICAL, "examine_select: Examining open file descriptors...");
for (fd = 0; fd < Squid_MaxFD; ++fd) {
FD_ZERO(&read_x);
}
F = &fd_table[fd];
- debugs(5, 0, "FD " << fd << ": " << xstrerror());
- debugs(5, 0, "WARNING: FD " << fd << " has handlers, but it's invalid.");
- debugs(5, 0, "FD " << fd << " is a " << fdTypeStr[F->type] << " called '" << F->desc << "'");
- debugs(5, 0, "tmout:" << F->timeoutHandler << " read:" << F->read_handler << " write:" << F->write_handler);
+ debugs(5, DBG_CRITICAL, "FD " << fd << ": " << xstrerror());
+ debugs(5, DBG_CRITICAL, "WARNING: FD " << fd << " has handlers, but it's invalid.");
+ debugs(5, DBG_CRITICAL, "FD " << fd << " is a " << fdTypeStr[F->type] << " called '" << F->desc << "'");
+ debugs(5, DBG_CRITICAL, "tmout:" << F->timeoutHandler << " read:" << F->read_handler << " write:" << F->write_handler);
for (ch = F->closeHandler; ch != NULL; ch = ch->Next())
- debugs(5, 0, " close handler: " << ch);
+ debugs(5, DBG_CRITICAL, " close handler: " << ch);
if (F->closeHandler != NULL) {
commCallCloseHandlers(fd);
} else if (F->timeoutHandler != NULL) {
- debugs(5, 0, "examine_select: Calling Timeout Handler");
+ debugs(5, DBG_CRITICAL, "examine_select: Calling Timeout Handler");
ScheduleCallHere(F->timeoutHandler);
}
if (ignoreErrno(errno))
break;
- debugs(5, 0, "comm_select: select failure: " << xstrerror());
+ debugs(5, DBG_CRITICAL, "comm_select: select failure: " << xstrerror());
examine_select(&readfds, &writefds);
fde *F = NULL;
struct stat sb;
- debugs(5, 0, "examine_select: Examining open file descriptors...");
+ debugs(5, DBG_CRITICAL, "examine_select: Examining open file descriptors...");
for (fd = 0; fd < Squid_MaxFD; ++fd) {
FD_ZERO(&read_x);
}
F = &fd_table[fd];
- debugs(5, 0, "FD " << fd << ": " << xstrerror());
- debugs(5, 0, "WARNING: FD " << fd << " has handlers, but it's invalid.");
- debugs(5, 0, "FD " << fd << " is a " << fdTypeStr[F->type] << " called '" << F->desc << "'");
- debugs(5, 0, "tmout:" << F->timeoutHandler << " read:" << F->read_handler << " write:" << F->write_handler);
+ debugs(5, DBG_CRITICAL, "FD " << fd << ": " << xstrerror());
+ debugs(5, DBG_CRITICAL, "WARNING: FD " << fd << " has handlers, but it's invalid.");
+ debugs(5, DBG_CRITICAL, "FD " << fd << " is a " << fdTypeStr[F->type] << " called '" << F->desc << "'");
+ debugs(5, DBG_CRITICAL, "tmout:" << F->timeoutHandler << " read:" << F->read_handler << " write:" << F->write_handler);
for (ch = F->closeHandler; ch != NULL; ch = ch->Next())
- debugs(5, 0, " close handler: " << ch);
+ debugs(5, DBG_CRITICAL, " close handler: " << ch);
if (F->closeHandler != NULL) {
commCallCloseHandlers(fd);
} else if (F->timeoutHandler != NULL) {
- debugs(5, 0, "examine_select: Calling Timeout Handler");
+ debugs(5, DBG_CRITICAL, "examine_select: Calling Timeout Handler");
ScheduleCallHere(F->timeoutHandler);
}
void
xassert(const char *msg, const char *file, int line)
{
- debugs(0, 0, "assertion failed: " << file << ":" << line << ": \"" << msg << "\"");
+ debugs(0, DBG_CRITICAL, "assertion failed: " << file << ":" << line << ": \"" << msg << "\"");
if (!shutting_down)
abort();
Ctx_Descrs[Ctx_Current_Level] = descr;
if (Ctx_Current_Level == Ctx_Warn_Level) {
- debugs(0, 0, "# ctx: suspiciously deep (" << Ctx_Warn_Level << ") nesting:");
+ debugs(0, DBG_CRITICAL, "# ctx: suspiciously deep (" << Ctx_Warn_Level << ") nesting:");
Ctx_Warn_Level *= 2;
}
DelayPools::pools(unsigned short newPools)
{
if (pools()) {
- debugs(3, 0, "parse_delay_pool_count: multiple delay_pools lines, aborting all previous delay_pools config");
+ debugs(3, DBG_CRITICAL, "parse_delay_pool_count: multiple delay_pools lines, aborting all previous delay_pools config");
FreePools();
}
Ip::Address A;
if (!(A = buf)) {
- debugs(78, 0, "WARNING: rejecting '" << buf << "' as a name server, because it is not a numeric IP address");
+ debugs(78, DBG_CRITICAL, "WARNING: rejecting '" << buf << "' as a name server, because it is not a numeric IP address");
return;
}
if (A.IsAnyAddr()) {
- debugs(78, 0, "WARNING: Squid does not accept " << A << " in DNS server specifications.");
+ debugs(78, DBG_CRITICAL, "WARNING: Squid does not accept " << A << " in DNS server specifications.");
A.SetLocalhost();
- debugs(78, 0, "Will be using " << A << " instead, assuming you meant that DNS is running on the same machine");
+ debugs(78, DBG_CRITICAL, "Will be using " << A << " instead, assuming you meant that DNS is running on the same machine");
}
if (!Ip::EnableIpv6 && !A.SetIPv4()) {
/* for backward compat we make %s show the full URL. Drop this in some future release. */
if (building_deny_info_url) {
p = request ? urlCanonical(request) : url;
- debugs(0,0, "WARNING: deny_info now accepts coded tags. Use %u to get the full URL instead of %s");
+ debugs(0, DBG_CRITICAL, "WARNING: deny_info now accepts coded tags. Use %u to get the full URL instead of %s");
} else
p = visible_appname_string;
break;
if (!tempParser->parse("<div>", 5,0) ||
!tempParser->parse(s + 3, strlen(s) - 3, 0) ||
!tempParser->parse("</div>",6,1)) {
- debugs(86, 0, "ESIContext::parserComment: Parsing fragment '" << s + 3 << "' failed.");
+ debugs(86, DBG_CRITICAL, "ESIContext::parserComment: Parsing fragment '" << s + 3 << "' failed.");
setError();
char tempstr[1024];
snprintf(tempstr, 1023, "ESIContext::parserComment: Parse error at line %ld:\n%s\n",
tempParser->lineNumber(),
tempParser->errorString());
- debugs(86, 0, "" << tempstr << "");
+ debugs(86, DBG_CRITICAL, "" << tempstr << "");
setErrorMessage(tempstr);
}
len = strlen (s);
if (len > sizeof (localbuf) - 9) {
- debugs(86, 0, "ESIContext::parserComment: Truncating long comment");
+ debugs(86, DBG_CRITICAL, "ESIContext::parserComment: Truncating long comment");
len = sizeof (localbuf) - 9;
}
snprintf (tempstr, 1023, "esiProcess: Parse error at line %ld:\n%s\n",
parserState.theParser->lineNumber(),
parserState.theParser->errorString());
- debugs(86, 0, "" << tempstr << "");
+ debugs(86, DBG_CRITICAL, "" << tempstr << "");
setErrorMessage(tempstr);
break;
case ESI_PROCESS_FAILED:
- debugs(86, 0, "esiProcess: tree Processed FAILED");
+ debugs(86, DBG_CRITICAL, "esiProcess: tree Processed FAILED");
setError();
setErrorMessage("esiProcess: ESI template Processing failed.");
assert (this);
if (!attempt.getRaw()) {
- debugs(86, 0, "esiTryProcess: Try has no attempt element - ESI template is invalid (section 3.4)");
+ debugs(86, DBG_CRITICAL, "esiTryProcess: Try has no attempt element - ESI template is invalid (section 3.4)");
return ESI_PROCESS_FAILED;
}
if (!except.getRaw()) {
- debugs(86, 0, "esiTryProcess: Try has no except element - ESI template is invalid (section 3.4)");
+ debugs(86, DBG_CRITICAL, "esiTryProcess: Try has no except element - ESI template is invalid (section 3.4)");
return ESI_PROCESS_FAILED;
}
/* Some elements require specific parents */
if (!(dynamic_cast<esiWhen*>(element.getRaw()) || dynamic_cast<esiOtherwise*>(element.getRaw()))) {
- debugs(86, 0, "esiChooseAdd: invalid child node for esi:choose (section 3.3)");
+ debugs(86, DBG_CRITICAL, "esiChooseAdd: invalid child node for esi:choose (section 3.3)");
return false;
}
if (dynamic_cast<esiOtherwise*>(element.getRaw())) {
if (otherwise.getRaw()) {
- debugs(86, 0, "esiChooseAdd: only one otherwise node allowed for esi:choose (section 3.3)");
+ debugs(86, DBG_CRITICAL, "esiChooseAdd: only one otherwise node allowed for esi:choose (section 3.3)");
return false;
}
"'");
if (clientBeginRequest(METHOD_GET, tempUrl, esiBufferRecipient, esiBufferDetach, stream.getRaw(), &tempheaders, stream->localbuffer->buf, HTTP_REQBUF_SZ)) {
- debugs(86, 0, "starting new ESI subrequest failed");
+ debugs(86, DBG_CRITICAL, "starting new ESI subrequest failed");
}
tempheaders.clean();
if (dynamic_cast<esiAttempt*>(element.getRaw()) ||
dynamic_cast<esiExcept*>(element.getRaw())) {
- debugs(86, 0, "esiSequenceAdd: misparented Attempt or Except element (section 3.4)");
+ debugs(86, DBG_CRITICAL, "esiSequenceAdd: misparented Attempt or Except element (section 3.4)");
return false;
}
int a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0, a6 = 0;
if (sscanf(asc, "%x:%x:%x:%x:%x:%x", &a1, &a2, &a3, &a4, &a5, &a6) != 6) {
- debugs(28, 0, "Decode EUI-48: Invalid ethernet address '" << asc << "'");
+ debugs(28, DBG_CRITICAL, "Decode EUI-48: Invalid ethernet address '" << asc << "'");
clear();
return false; /* This is not valid address */
}
mib[5] = RTF_LLINFO;
if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
- debugs(28, 0, "Can't estimate ARP table size!");
+ debugs(28, DBG_CRITICAL, "Can't estimate ARP table size!");
clear();
return false;
}
if ((buf = (char *)xmalloc(needed)) == NULL) {
- debugs(28, 0, "Can't allocate temporary ARP table!");
+ debugs(28, DBG_CRITICAL, "Can't allocate temporary ARP table!");
clear();
return false;
}
if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
- debugs(28, 0, "Can't retrieve ARP table!");
+ debugs(28, DBG_CRITICAL, "Can't retrieve ARP table!");
xfree(buf);
clear();
return false;
/* Get size of Windows ARP table */
if (GetIpNetTable(NetTable, &ipNetTableLen, FALSE) != ERROR_INSUFFICIENT_BUFFER) {
- debugs(28, 0, "Can't estimate ARP table size!");
+ debugs(28, DBG_CRITICAL, "Can't estimate ARP table size!");
clear();
return false;
}
/* Allocate space for ARP table and assign pointers */
if ((NetTable = (PMIB_IPNETTABLE)xmalloc(ipNetTableLen)) == NULL) {
- debugs(28, 0, "Can't allocate temporary ARP table!");
+ debugs(28, DBG_CRITICAL, "Can't allocate temporary ARP table!");
clear();
return false;
}
/* Get actual ARP table */
if ((dwNetTable = GetIpNetTable(NetTable, &ipNetTableLen, FALSE)) != NO_ERROR) {
- debugs(28, 0, "Can't retrieve ARP table!");
+ debugs(28, DBG_CRITICAL, "Can't retrieve ARP table!");
xfree(NetTable);
clear();
return false;
#else
- debugs(28, 0, "ERROR: ARP / MAC / EUI-* operations not supported on this operating system.");
+ debugs(28, DBG_CRITICAL, "ERROR: ARP / MAC / EUI-* operations not supported on this operating system.");
#endif
/*
#if 0 /* no actual lookup coded yet */
/* no OS yet supported for NDP protocol lookup */
- debugs(28, 0, "ERROR: ARP / MAC / EUI-* operations not supported on this operating system.");
+ debugs(28, DBG_CRITICAL, "ERROR: ARP / MAC / EUI-* operations not supported on this operating system.");
/*
* Address was not found on any interface
a->negative_ttl = atoi(token + 13);
} else if (strncmp(token, "children=", 9) == 0) {
a->children.n_max = atoi(token + 9);
- debugs(0, 0, "WARNING: external_acl_type option children=N has been deprecated in favor of children-max=N and children-startup=N");
+ debugs(0, DBG_CRITICAL, "WARNING: external_acl_type option children=N has been deprecated in favor of children-max=N and children-startup=N");
} else if (strncmp(token, "children-max=", 13) == 0) {
a->children.n_max = atoi(token + 13);
} else if (strncmp(token, "children-startup=", 17) == 0) {
bind to IPv4/v6 localhost port. */
} else if (strcmp(token, "ipv4") == 0) {
if ( !a->local_addr.SetIPv4() ) {
- debugs(3, 0, "WARNING: Error converting " << a->local_addr << " to IPv4 in " << a->name );
+ debugs(3, DBG_CRITICAL, "WARNING: Error converting " << a->local_addr << " to IPv4 in " << a->name );
}
} else if (strcmp(token, "ipv6") == 0) {
if (!Ip::EnableIpv6)
- debugs(3, 0, "WARNING: --enable-ipv6 required for external ACL helpers to use IPv6: " << a->name );
+ debugs(3, DBG_CRITICAL, "WARNING: --enable-ipv6 required for external ACL helpers to use IPv6: " << a->name );
// else nothing to do.
} else {
break;
else if (strcmp(token, "%%") == 0)
format->type = _external_acl_format::EXT_ACL_PERCENT;
else {
- debugs(0,0, "ERROR: Unknown Format token " << token);
+ debugs(0, DBG_CRITICAL, "ERROR: Unknown Format token " << token);
self_destruct();
}
#if USE_AUTH
if (data->def->require_auth) {
if (authenticateSchemeCount() == 0) {
- debugs(28, 0, "Can't use proxy auth because no authentication schemes were compiled.");
+ debugs(28, DBG_CRITICAL, "Can't use proxy auth because no authentication schemes were compiled.");
return false;
}
if (authenticateActiveSchemeCount() == 0) {
- debugs(28, 0, "Can't use proxy auth because no authentication schemes are fully configured.");
+ debugs(28, DBG_CRITICAL, "Can't use proxy auth because no authentication schemes are fully configured.");
return false;
}
}
if (newReserve > x) {
/* perhaps this should be fatal()? -DW */
- debugs(51, 0, "WARNING: This machine has a serious shortage of filedescriptors.");
+ debugs(51, DBG_CRITICAL, "WARNING: This machine has a serious shortage of filedescriptors.");
newReserve = x;
}
if (Squid_MaxFD - newReserve < min(256, Squid_MaxFD / 2))
fatalf("Too few filedescriptors available in the system (%d usable of %d).\n", Squid_MaxFD - newReserve, Squid_MaxFD);
- debugs(51, 0, "Reserved FD adjusted from " << RESERVED_FD << " to " << newReserve << " due to failures");
+ debugs(51, DBG_CRITICAL, "Reserved FD adjusted from " << RESERVED_FD << " to " << newReserve << " due to failures");
RESERVED_FD = newReserve;
}
if (tokenArray != NULL)
tokens.push_back(TokenNamespace(nsName, tokenArray));
else
- debugs(0,0, "BUG: format tokens for '" << nsName << "' missing!");
+ debugs(0, DBG_CRITICAL, "BUG: format tokens for '" << nsName << "' missing!");
}
break;
case LFT_HTTP_SENT_STATUS_CODE_OLD_30:
- debugs(46, 0, "WARNING: The \"Hs\" formatting code is deprecated. Use the \">Hs\" instead.");
+ debugs(46, DBG_CRITICAL, "WARNING: The \"Hs\" formatting code is deprecated. Use the \">Hs\" instead.");
type = LFT_HTTP_SENT_STATUS_CODE;
break;
case LFT_SERVER_LOCAL_IP_OLD_27:
- debugs(46, 0, "WARNING: The \"oa\" formatting code is deprecated. Use the \"<la\" instead.");
+ debugs(46, DBG_CRITICAL, "WARNING: The \"oa\" formatting code is deprecated. Use the \"<la\" instead.");
type = LFT_SERVER_LOCAL_IP;
break;
case LFT_REQUEST_URLPATH_OLD_31:
- debugs(46, 0, "WARNING: The \"rp\" formatting code is deprecated. Use the \">rp\" instead.");
+ debugs(46, DBG_CRITICAL, "WARNING: The \"rp\" formatting code is deprecated. Use the \">rp\" instead.");
type = LFT_CLIENT_REQ_URLPATH;
break;
case LFT_REQUEST_VERSION_OLD_2X:
- debugs(46, 0, "WARNING: The \">v\" formatting code is deprecated. Use the \">rv\" instead.");
+ debugs(46, DBG_CRITICAL, "WARNING: The \">v\" formatting code is deprecated. Use the \">rv\" instead.");
type = LFT_REQUEST_VERSION;
break;
#if !USE_SQUID_EUI
case LFT_CLIENT_EUI:
- debugs(46, 0, "WARNING: The \">eui\" formatting code requires EUI features which are disabled in this Squid.");
+ debugs(46, DBG_CRITICAL, "WARNING: The \">eui\" formatting code requires EUI features which are disabled in this Squid.");
break;
#endif
fp = fopen(swaplog_path, "rb");
if (fp == NULL) {
- debugs(50, 0, "" << swaplog_path << ": " << xstrerror());
+ debugs(50, DBG_CRITICAL, "" << swaplog_path << ": " << xstrerror());
fatal("Failed to open swap log for reading");
}
if (outbuf_offset + ss > CLEAN_BUF_SZ) {
if (FD_WRITE_METHOD(fd, outbuf, outbuf_offset) < 0) {
- debugs(50, 0, "storeCossDirWriteCleanLogs: " << newLog << ": write: " << xstrerror());
- debugs(50, 0, "storeCossDirWriteCleanLogs: Current swap logfile not replaced.");
+ debugs(50, DBG_CRITICAL, "storeCossDirWriteCleanLogs: " << newLog << ": write: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "storeCossDirWriteCleanLogs: Current swap logfile not replaced.");
file_close(fd);
fd = -1;
unlink(newLog);
return;
if (FD_WRITE_METHOD(state->fd, state->outbuf, state->outbuf_offset) < 0) {
- debugs(50, 0, "storeCossDirWriteCleanLogs: " << state->newLog << ": write: " << xstrerror());
- debugs(50, 0, "storeCossDirWriteCleanLogs: Current swap logfile not replaced.");
+ debugs(50, DBG_CRITICAL, "storeCossDirWriteCleanLogs: " << state->newLog << ": write: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "storeCossDirWriteCleanLogs: Current swap logfile not replaced.");
file_close(state->fd);
state->fd = -1;
::unlink(state->newLog);
const uint64_t max_offset = (uint64_t)SwapFilenMax << blksz_bits;
if (maxSize() > max_offset) {
- debugs(47, 0, "COSS block-size = " << (1<<blksz_bits) << " bytes");
- debugs(47,0, "COSS largest file offset = " << (max_offset >> 10) << " KB");
- debugs(47, 0, "COSS cache_dir size = " << (maxSize() >> 10) << " KB");
+ debugs(47, DBG_CRITICAL, "COSS block-size = " << (1<<blksz_bits) << " bytes");
+ debugs(47, DBG_CRITICAL, "COSS largest file offset = " << (max_offset >> 10) << " KB");
+ debugs(47, DBG_CRITICAL, "COSS cache_dir size = " << (maxSize() >> 10) << " KB");
fatal("COSS cache_dir size exceeds largest offset\n");
}
}
return true;
if (reconfiguring) {
- debugs(47, 0, "WARNING: cannot change COSS block-size while Squid is running");
+ debugs(47, DBG_CRITICAL, "WARNING: cannot change COSS block-size while Squid is running");
return false;
}
UFSStoreState::openDone()
{
if (closing)
- debugs(0,0,HERE << "already closing in openDone()!?");
+ debugs(0, DBG_CRITICAL, HERE << "already closing in openDone()!?");
if (theFile->error()) {
tryClosing();
return;
if (hlp->childs.concurrency)
- debugs(84, 0, "ERROR: concurrency= is not yet supported for stateful helpers ('" << hlp->cmdline << "')");
+ debugs(84, DBG_CRITICAL, "ERROR: concurrency= is not yet supported for stateful helpers ('" << hlp->cmdline << "')");
char *progname = hlp->cmdline->key;
/* note, don't free id_name, it probably points to static memory */
if (queue.head)
- debugs(84, 0, "WARNING: freeing " << id_name << " helper with " << stats.queue_size << " requests queued");
+ debugs(84, DBG_CRITICAL, "WARNING: freeing " << id_name << " helper with " << stats.queue_size << " requests queued");
}
/* ====================================================================== */
if (!srv->flags.shutdown) {
assert( hlp->childs.n_active > 0);
-- hlp->childs.n_active;
- debugs(84, 0, "WARNING: " << hlp->id_name << " #" << srv->index + 1 << " exited");
+ debugs(84, DBG_CRITICAL, "WARNING: " << hlp->id_name << " #" << srv->index + 1 << " exited");
if (hlp->childs.needNew() > 0) {
debugs(80, DBG_IMPORTANT, "Too few " << hlp->id_name << " processes are running (need " << hlp->childs.needNew() << "/" << hlp->childs.n_max << ")");
/* do this first so idle=N has a chance to grow the child pool before it hits critical. */
if (hlp->childs.needNew() > 0) {
- debugs(84, 0, "Starting new " << hlp->id_name << " helpers...");
+ debugs(84, DBG_CRITICAL, "Starting new " << hlp->id_name << " helpers...");
helperOpenServers(hlp);
return;
}
hlp->last_queue_warn = squid_curtime;
- debugs(84, 0, "WARNING: All " << hlp->childs.n_active << "/" << hlp->childs.n_max << " " << hlp->id_name << " processes are busy.");
- debugs(84, 0, "WARNING: " << hlp->stats.queue_size << " pending requests queued");
- debugs(84, 0, "WARNING: Consider increasing the number of " << hlp->id_name << " processes in your config file.");
+ debugs(84, DBG_CRITICAL, "WARNING: All " << hlp->childs.n_active << "/" << hlp->childs.n_max << " " << hlp->id_name << " processes are busy.");
+ debugs(84, DBG_CRITICAL, "WARNING: " << hlp->stats.queue_size << " pending requests queued");
+ debugs(84, DBG_CRITICAL, "WARNING: Consider increasing the number of " << hlp->id_name << " processes in your config file.");
if (hlp->stats.queue_size > (int)hlp->childs.n_running * 2)
fatalf("Too many queued %s requests", hlp->id_name);
/* do this first so idle=N has a chance to grow the child pool before it hits critical. */
if (hlp->childs.needNew() > 0) {
- debugs(84, 0, "Starting new " << hlp->id_name << " helpers...");
+ debugs(84, DBG_CRITICAL, "Starting new " << hlp->id_name << " helpers...");
helperStatefulOpenServers(hlp);
return;
}
hlp->last_queue_warn = squid_curtime;
- debugs(84, 0, "WARNING: All " << hlp->childs.n_active << "/" << hlp->childs.n_max << " " << hlp->id_name << " processes are busy.");
- debugs(84, 0, "WARNING: " << hlp->stats.queue_size << " pending requests queued");
- debugs(84, 0, "WARNING: Consider increasing the number of " << hlp->id_name << " processes in your config file.");
+ debugs(84, DBG_CRITICAL, "WARNING: All " << hlp->childs.n_active << "/" << hlp->childs.n_max << " " << hlp->id_name << " processes are busy.");
+ debugs(84, DBG_CRITICAL, "WARNING: " << hlp->stats.queue_size << " pending requests queued");
+ debugs(84, DBG_CRITICAL, "WARNING: Consider increasing the number of " << hlp->id_name << " processes in your config file.");
}
static helper_request *
if (flag != COMM_OK) {
/* Helper server has crashed */
- debugs(84, 0, "helperDispatch: Helper " << srv->parent->id_name << " #" << srv->index + 1 << " has crashed");
+ debugs(84, DBG_CRITICAL, "helperDispatch: Helper " << srv->parent->id_name << " #" << srv->index + 1 << " has crashed");
return;
}
icmp_sock = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP);
if (icmp_sock < 0) {
- debugs(50, 0, HERE << " icmp_sock: " << xstrerror());
+ debugs(50, DBG_CRITICAL, HERE << " icmp_sock: " << xstrerror());
return -1;
}
static pingerReplyData preply;
if (icmp_sock < 0) {
- debugs(42, 0, HERE << "No socket! Recv() should not be called.");
+ debugs(42, DBG_CRITICAL, HERE << "No socket! Recv() should not be called.");
return;
}
icmp_sock = socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
if (icmp_sock < 0) {
- debugs(50, 0, HERE << " icmp_sock: " << xstrerror());
+ debugs(50, DBG_CRITICAL, HERE << " icmp_sock: " << xstrerror());
return -1;
}
static pingerReplyData preply;
if (icmp_sock < 0) {
- debugs(42,0, HERE << "dropping ICMPv6 read. No socket!?");
+ debugs(42, DBG_CRITICAL, HERE << "dropping ICMPv6 read. No socket!?");
return;
}
ip = (struct ip6_hdr *) pkt;
pkt += sizeof(ip6_hdr);
- debugs(42,0, HERE << "ip6_nxt=" << ip->ip6_nxt <<
+ debugs(42, DBG_CRITICAL, HERE << "ip6_nxt=" << ip->ip6_nxt <<
", ip6_plen=" << ip->ip6_plen <<
", ip6_hlim=" << ip->ip6_hlim <<
", ip6_hops=" << ip->ip6_hops <<
if (x < (int)sizeof(wpi)) {
getCurrentTime();
- debugs(42, 0, HERE << "read: FD 0: " << xstrerror());
+ debugs(42, DBG_CRITICAL, HERE << "read: FD 0: " << xstrerror());
write(1, "ERR\n", 4);
return -1;
}
if (x < (int)sizeof(PS)) {
getCurrentTime();
- debugs(42, 0, HERE << "read: FD 0: " << xstrerror());
+ debugs(42, DBG_CRITICAL, HERE << "read: FD 0: " << xstrerror());
write(1, "ERR\n", 4);
return -1;
}
if (icmp_sock == -1) {
getCurrentTime();
- debugs(42, 0, HERE << "WSASocket: " << xstrerror());
+ debugs(42, DBG_CRITICAL, HERE << "WSASocket: " << xstrerror());
write(1, "ERR\n", 4);
return -1;
}
if (SOCKET_ERROR == x) {
getCurrentTime();
- debugs(42, 0, HERE << "connect: " << xstrerror());
+ debugs(42, DBG_CRITICAL, HERE << "connect: " << xstrerror());
write(1, "ERR\n", 4);
return -1;
}
x = recv(icmp_sock, (void *) buf, sizeof(buf), 0);
if (x < 3) {
- debugs(42, 0, HERE << "recv: " << xstrerror());
+ debugs(42, DBG_CRITICAL, HERE << "recv: " << xstrerror());
return -1;
}
x = send(icmp_sock, (const void *) buf, strlen(buf), 0);
if (x < 3 || strncmp("OK\n", buf, 3)) {
- debugs(42, 0, HERE << "recv: " << xstrerror());
+ debugs(42, DBG_CRITICAL, HERE << "recv: " << xstrerror());
return -1;
}
if (0 == n) {
/* EOF indicator */
- debugs(42, 0, HERE << "EOF encountered. Pinger exiting.\n");
+ debugs(42, DBG_CRITICAL, HERE << "EOF encountered. Pinger exiting.\n");
errno = 0;
Close();
exit(1);
debugs(42, 2, HERE << "return result to squid. len=" << len);
if (send(socket_to_squid, &preply, len, 0) < 0) {
- debugs(42, 0, "pinger: FATAL error on send: " << xstrerror());
+ debugs(42, DBG_CRITICAL, "pinger: FATAL error on send: " << xstrerror());
Close();
exit(1);
}
if (hIpc) {
if (WaitForSingleObject(hIpc, 12000) != WAIT_OBJECT_0) {
getCurrentTime();
- debugs(37, 0, HERE << "WARNING: (pinger," << pid << ") didn't exit in 12 seconds");
+ debugs(37, DBG_CRITICAL, HERE << "WARNING: (pinger," << pid << ") didn't exit in 12 seconds");
}
CloseHandle(hIpc);
}
if (i != memInUse(MEM_NETDBENTRY))
- debugs(38, 0, "WARNING: netdb_addrs count off, found " << i <<
+ debugs(38, DBG_CRITICAL, "WARNING: netdb_addrs count off, found " << i <<
", expected " << memInUse(MEM_NETDBENTRY));
qsort((char *) list,
_db_init(NULL, debug_args);
- debugs(42, 0, "pinger: Initialising ICMP pinger ...");
+ debugs(42, DBG_CRITICAL, "pinger: Initialising ICMP pinger ...");
icmp4_worker = icmp4.Open();
if (icmp4_worker < 0) {
- debugs(42, 0, "pinger: Unable to start ICMP pinger.");
+ debugs(42, DBG_CRITICAL, "pinger: Unable to start ICMP pinger.");
}
max_fd = max(max_fd, icmp4_worker);
#if USE_IPV6
icmp6_worker = icmp6.Open();
if (icmp6_worker <0 ) {
- debugs(42, 0, "pinger: Unable to start ICMPv6 pinger.");
+ debugs(42, DBG_CRITICAL, "pinger: Unable to start ICMPv6 pinger.");
}
max_fd = max(max_fd, icmp6_worker);
#endif
/** abort if neither worker could open a socket. */
if (icmp4_worker < 0 && icmp6_worker < 0) {
- debugs(42, 0, "FATAL: pinger: Unable to open any ICMP sockets.");
+ debugs(42, DBG_CRITICAL, "FATAL: pinger: Unable to open any ICMP sockets.");
exit(1);
}
if ( (squid_link = control.Open()) < 0) {
- debugs(42, 0, "FATAL: pinger: Unable to setup Pinger control sockets.");
+ debugs(42, DBG_CRITICAL, "FATAL: pinger: Unable to setup Pinger control sockets.");
icmp4.Close();
icmp6.Close();
exit(1); // fatal error if the control channel fails.
getCurrentTime();
if (x < 0) {
- debugs(42, 0, HERE << " FATAL Shutdown. select()==" << x << ", ERR: " << xstrerror());
+ debugs(42, DBG_CRITICAL, HERE << " FATAL Shutdown. select()==" << x << ", ERR: " << xstrerror());
control.Close();
exit(1);
}
if (PINGER_TIMEOUT + last_check_time < squid_curtime) {
if (send(LINK_TO_SQUID, &tv, 0, 0) < 0) {
- debugs(42, 0, "pinger: Closing. No requests in last " << PINGER_TIMEOUT << " seconds.");
+ debugs(42, DBG_CRITICAL, "pinger: Closing. No requests in last " << PINGER_TIMEOUT << " seconds.");
control.Close();
exit(1);
}
_icp_common_t::handleReply(char *buf, Ip::Address &from)
{
if (neighbors_do_private_keys && reqnum == 0) {
- debugs(12, 0, "icpHandleIcpV2: Neighbor " << from << " returned reqnum = 0");
- debugs(12, 0, "icpHandleIcpV2: Disabling use of private keys");
+ debugs(12, DBG_CRITICAL, "icpHandleIcpV2: Neighbor " << from << " returned reqnum = 0");
+ debugs(12, DBG_CRITICAL, "icpHandleIcpV2: Disabling use of private keys");
neighbors_do_private_keys = 0;
}
break;
default:
- debugs(12, 0, "icpHandleIcpV2: UNKNOWN OPCODE: " << header.opcode << " from " << from);
+ debugs(12, DBG_CRITICAL, "icpHandleIcpV2: UNKNOWN OPCODE: " << header.opcode << " from " << from);
break;
}
break;
default:
- debugs(12, 0, "icpHandleIcpV3: UNKNOWN OPCODE: " << header.opcode << " from " << from);
+ debugs(12, DBG_CRITICAL, "icpHandleIcpV3: UNKNOWN OPCODE: " << header.opcode << " from " << from);
break;
}
}
return GetReverseString6(buf, m_SocketAddr.sin6_addr);
}
- debugs(14,0, "Unable to convert '" << NtoA(buf,MAX_IPSTRLEN) << "' to the rDNS type requested.");
+ debugs(14, DBG_CRITICAL, "Unable to convert '" << NtoA(buf,MAX_IPSTRLEN) << "' to the rDNS type requested.");
buf[0] = '\0';
GetInAddr(tmp);
inet_ntop(AF_INET, &tmp, buf, blen);
} else {
- debugs(14,0,"WARNING: Corrupt IP Address details OR required to display in unknown format (" <<
+ debugs(14, DBG_CRITICAL, "WARNING: Corrupt IP Address details OR required to display in unknown format (" <<
force << "). accepted={" << AF_UNSPEC << "," << AF_INET << "," << AF_INET6 << "}");
fprintf(stderr,"WARNING: Corrupt IP Address details OR required to display in unknown format (%d). accepted={%d,%d,%d} ",
force, AF_UNSPEC, AF_INET, AF_INET6);
int c2p[2];
if (pipe(p2c) < 0) {
- debugs(54, 0, "ipcCreate: pipe: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: pipe: " << xstrerror());
return -1; // maybe ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
fd_open(prfd = p2c[0], FD_PIPE, "IPC FIFO Parent Read");
fd_open(cwfd = p2c[1], FD_PIPE, "IPC FIFO Child Write");
if (pipe(c2p) < 0) {
- debugs(54, 0, "ipcCreate: pipe: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: pipe: " << xstrerror());
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
fd_open(crfd = c2p[0], FD_PIPE, "IPC FIFO Child Read");
int buflen = 32768;
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
- debugs(54, 0, "ipcCreate: socketpair: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: socketpair: " << xstrerror());
return -1;
}
int fds[2];
if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds) < 0) {
- debugs(54, 0, "ipcCreate: socketpair: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: socketpair: " << xstrerror());
return -1;
}
if (getsockname(pwfd, AI->ai_addr, &AI->ai_addrlen) < 0) {
PaS.FreeAddrInfo(AI);
- debugs(54, 0, "ipcCreate: getsockname: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
if (getsockname(crfd, AI->ai_addr, &AI->ai_addrlen) < 0) {
ChS.FreeAddrInfo(AI);
- debugs(54, 0, "ipcCreate: getsockname: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
x = read(prfd, hello_buf, HELLO_BUF_SZ - 1);
if (x < 0) {
- debugs(54, 0, "ipcCreate: PARENT: hello read test failed");
- debugs(54, 0, "--> read: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: hello read test failed");
+ debugs(54, DBG_CRITICAL, "--> read: " << xstrerror());
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
} else if (strcmp(hello_buf, hello_string)) {
- debugs(54, 0, "ipcCreate: PARENT: hello read test failed");
- debugs(54, 0, "--> read returned " << x);
- debugs(54, 0, "--> got '" << rfc1738_escape(hello_buf) << "'");
+ debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: hello read test failed");
+ debugs(54, DBG_CRITICAL, "--> read returned " << x);
+ debugs(54, DBG_CRITICAL, "--> got '" << rfc1738_escape(hello_buf) << "'");
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
debugs(54, 3, "ipcCreate: calling accept on FD " << crfd);
if ((fd = accept(crfd, NULL, NULL)) < 0) {
- debugs(54, 0, "ipcCreate: FD " << crfd << " accept: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: FD " << crfd << " accept: " << xstrerror());
_exit(1);
}
x = comm_udp_send(cwfd, hello_string, strlen(hello_string) + 1, 0);
if (x < 0) {
- debugs(54, 0, "sendto FD " << cwfd << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: hello write test failed");
+ debugs(54, DBG_CRITICAL, "sendto FD " << cwfd << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: hello write test failed");
_exit(1);
}
} else {
if (write(cwfd, hello_string, strlen(hello_string) + 1) < 0) {
- debugs(54, 0, "write FD " << cwfd << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: hello write test failed");
+ debugs(54, DBG_CRITICAL, "write FD " << cwfd << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: hello write test failed");
_exit(1);
}
}
debug_log = fdopen(2, "a+");
- debugs(54, 0, "ipcCreate: " << prog << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: " << prog << ": " << xstrerror());
_exit(1);
0,
name);
} else if (type == IPC_FIFO) {
- debugs(54, 0, "ipcCreate: " << prog << ": use IPC_TCP_SOCKET instead of IP_FIFO on Windows");
+ debugs(54, DBG_CRITICAL, "ipcCreate: " << prog << ": use IPC_TCP_SOCKET instead of IP_FIFO on Windows");
assert(0);
} else {
assert(IPC_NONE);
}
if (crfd < 0) {
- debugs(54, 0, "ipcCreate: Failed to create child FD.");
+ debugs(54, DBG_CRITICAL, "ipcCreate: Failed to create child FD.");
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
if (pwfd < 0) {
- debugs(54, 0, "ipcCreate: Failed to create server FD.");
+ debugs(54, DBG_CRITICAL, "ipcCreate: Failed to create server FD.");
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
tmp_addr.InitAddrInfo(aiPS);
if (getsockname(pwfd, aiPS->ai_addr, &(aiPS->ai_addrlen) ) < 0) {
- debugs(54, 0, "ipcCreate: getsockname: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
tmp_addr.InitAddrInfo(aiCS);
if (getsockname(crfd, aiCS->ai_addr, &(aiCS->ai_addrlen) ) < 0) {
- debugs(54, 0, "ipcCreate: getsockname: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
}
x = recv(prfd, (void *)hello_buf, HELLO_BUF_SZ - 1, 0);
if (x < 0) {
- debugs(54, 0, "ipcCreate: PARENT: hello read test failed");
- debugs(54, 0, "--> read: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: hello read test failed");
+ debugs(54, DBG_CRITICAL, "--> read: " << xstrerror());
CloseHandle((HANDLE) thread);
return ipcCloseAllFD(prfd, pwfd, -1, -1);
} else if (strcmp(hello_buf, hello_string)) {
- debugs(54, 0, "ipcCreate: PARENT: hello read test failed");
- debugs(54, 0, "--> read returned " << x);
- debugs(54, 0, "--> got '" << rfc1738_escape(hello_buf) << "'");
+ debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: hello read test failed");
+ debugs(54, DBG_CRITICAL, "--> read returned " << x);
+ debugs(54, DBG_CRITICAL, "--> got '" << rfc1738_escape(hello_buf) << "'");
CloseHandle((HANDLE) thread);
return ipcCloseAllFD(prfd, pwfd, -1, -1);
}
x = send(pwfd, (const void *)ok_string, strlen(ok_string), 0);
if (x < 0) {
- debugs(54, 0, "ipcCreate: PARENT: OK write test failed");
- debugs(54, 0, "--> read: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: OK write test failed");
+ debugs(54, DBG_CRITICAL, "--> read: " << xstrerror());
CloseHandle((HANDLE) thread);
return ipcCloseAllFD(prfd, pwfd, -1, -1);
}
x = recv(prfd, (void *)hello_buf, HELLO_BUF_SZ - 1, 0);
if (x < 0) {
- debugs(54, 0, "ipcCreate: PARENT: OK read test failed");
- debugs(54, 0, "--> read: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: OK read test failed");
+ debugs(54, DBG_CRITICAL, "--> read: " << xstrerror());
CloseHandle((HANDLE) thread);
return ipcCloseAllFD(prfd, pwfd, -1, -1);
} else if (!strcmp(hello_buf, err_string)) {
- debugs(54, 0, "ipcCreate: PARENT: OK read test failed");
- debugs(54, 0, "--> read returned " << x);
- debugs(54, 0, "--> got '" << rfc1738_escape(hello_buf) << "'");
+ debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: OK read test failed");
+ debugs(54, DBG_CRITICAL, "--> read returned " << x);
+ debugs(54, DBG_CRITICAL, "--> got '" << rfc1738_escape(hello_buf) << "'");
CloseHandle((HANDLE) thread);
return ipcCloseAllFD(prfd, pwfd, -1, -1);
}
x = send(cwfd, (const void *)buf, len, 0);
if (x < 0) {
- debugs(54, 0, "sendto FD " << cwfd << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: hello write test failed");
+ debugs(54, DBG_CRITICAL, "sendto FD " << cwfd << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: hello write test failed");
}
return x;
debugs(54, 3, "ipcCreate: calling accept on FD " << crfd);
if ((fd = accept(crfd, NULL, NULL)) < 0) {
- debugs(54, 0, "ipcCreate: FD " << crfd << " accept: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: FD " << crfd << " accept: " << xstrerror());
goto cleanup;
}
x = send(cwfd, (const void *)hello_string, strlen(hello_string) + 1, 0);
if (x < 0) {
- debugs(54, 0, "sendto FD " << cwfd << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: hello write test failed");
+ debugs(54, DBG_CRITICAL, "sendto FD " << cwfd << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: hello write test failed");
goto cleanup;
}
x = recv(crfd, (void *)buf1, 8191, 0);
if (x < 0) {
- debugs(54, 0, "ipcCreate: CHILD: OK read test failed");
- debugs(54, 0, "--> read: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: OK read test failed");
+ debugs(54, DBG_CRITICAL, "--> read: " << xstrerror());
goto cleanup;
} else if (strcmp(buf1, ok_string)) {
- debugs(54, 0, "ipcCreate: CHILD: OK read test failed");
- debugs(54, 0, "--> read returned " << x);
- debugs(54, 0, "--> got '" << rfc1738_escape(hello_buf) << "'");
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: OK read test failed");
+ debugs(54, DBG_CRITICAL, "--> read returned " << x);
+ debugs(54, DBG_CRITICAL, "--> got '" << rfc1738_escape(hello_buf) << "'");
goto cleanup;
}
/* assign file descriptors to child process */
if (_pipe(p2c, 1024, _O_BINARY | _O_NOINHERIT) < 0) {
- debugs(54, 0, "ipcCreate: CHILD: pipe: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: pipe: " << xstrerror());
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
if (_pipe(c2p, 1024, _O_BINARY | _O_NOINHERIT) < 0) {
- debugs(54, 0, "ipcCreate: CHILD: pipe: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: pipe: " << xstrerror());
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
crfd_ipc = cwfd_ipc = comm_open(SOCK_DGRAM, IPPROTO_UDP, local_addr, 0, buf1);
if (crfd_ipc < 0) {
- debugs(54, 0, "ipcCreate: CHILD: Failed to create child FD for " << prog << ".");
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: Failed to create child FD for " << prog << ".");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
prfd_ipc = pwfd_ipc = comm_open(SOCK_DGRAM, IPPROTO_UDP, local_addr, 0, buf1);
if (pwfd_ipc < 0) {
- debugs(54, 0, "ipcCreate: CHILD: Failed to create server FD for " << prog << ".");
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: Failed to create server FD for " << prog << ".");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
PS_ipc.InitAddrInfo(aiPS_ipc);
if (getsockname(pwfd_ipc, aiPS_ipc->ai_addr, &(aiPS_ipc->ai_addrlen)) < 0) {
- debugs(54, 0, "ipcCreate: getsockname: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
CS_ipc.InitAddrInfo(aiCS_ipc);
if (getsockname(crfd_ipc, aiCS_ipc->ai_addr, &(aiCS_ipc->ai_addrlen)) < 0) {
- debugs(54, 0, "ipcCreate: getsockname: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
if (pid == -1) {
errno = x;
- debugs(54, 0, "ipcCreate: CHILD: " << params->prog << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: " << params->prog << ": " << xstrerror());
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
memset(&wpi, 0, sizeof(wpi));
if (SOCKET_ERROR == WSADuplicateSocket(crfd_ipc, pid, &wpi)) {
- debugs(54, 0, "ipcCreate: CHILD: WSADuplicateSocket: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: WSADuplicateSocket: " << xstrerror());
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
x = write(c2p[1], (const char *) &wpi, sizeof(wpi));
if (x < (ssize_t)sizeof(wpi)) {
- debugs(54, 0, "ipcCreate: CHILD: write FD " << c2p[1] << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: write FD " << c2p[1] << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
x = read(p2c[0], buf1, 8192);
if (x < 0) {
- debugs(54, 0, "ipcCreate: CHILD: read FD " << p2c[0] << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: read FD " << p2c[0] << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
} else if (strncmp(buf1, ok_string, strlen(ok_string))) {
- debugs(54, 0, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
- debugs(54, 0, "--> read returned " << x);
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
+ debugs(54, DBG_CRITICAL, "--> read returned " << x);
buf1[x] = '\0';
- debugs(54, 0, "--> got '" << rfc1738_escape(buf1) << "'");
+ debugs(54, DBG_CRITICAL, "--> got '" << rfc1738_escape(buf1) << "'");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
x = write(c2p[1], (const char *) &PS_ipc, sizeof(PS_ipc));
if (x < (ssize_t)sizeof(PS_ipc)) {
- debugs(54, 0, "ipcCreate: CHILD: write FD " << c2p[1] << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: write FD " << c2p[1] << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
x = read(p2c[0], buf1, 8192);
if (x < 0) {
- debugs(54, 0, "ipcCreate: CHILD: read FD " << p2c[0] << ": " << xstrerror());
- debugs(54, 0, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: read FD " << p2c[0] << ": " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
} else if (strncmp(buf1, ok_string, strlen(ok_string))) {
- debugs(54, 0, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
- debugs(54, 0, "--> read returned " << x);
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: " << prog << ": socket exchange failed");
+ debugs(54, DBG_CRITICAL, "--> read returned " << x);
buf1[x] = '\0';
- debugs(54, 0, "--> got '" << rfc1738_escape(buf1) << "'");
+ debugs(54, DBG_CRITICAL, "--> got '" << rfc1738_escape(buf1) << "'");
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
thread = (HANDLE)_beginthreadex(NULL, 0, ipc_thread_2, &thread_params, 0, NULL);
if (!thread) {
- debugs(54, 0, "ipcCreate: CHILD: _beginthreadex: " << xstrerror());
+ debugs(54, DBG_CRITICAL, "ipcCreate: CHILD: _beginthreadex: " << xstrerror());
ipcSend(cwfd, err_string, strlen(err_string));
goto cleanup;
}
WaitForSingleObject(hProcess, type == IPC_UDP_SOCKET ? 12000 : 5000)) {
getCurrentTime();
- debugs(54, 0, "ipc(" << prog << "," << pid << "): WARNING: " << prog <<
+ debugs(54, DBG_CRITICAL, "ipc(" << prog << "," << pid << "): WARNING: " << prog <<
" didn't exit in " << (type == IPC_UDP_SOCKET ? 12 : 5) << " seconds.");
}
if (thread && WAIT_OBJECT_0 != WaitForSingleObject(thread, 3000)) {
getCurrentTime();
- debugs(54, 0, "ipc(" << prog << "," << pid << "): WARNING: ipc_thread_2 didn't exit in 3 seconds.");
+ debugs(54, DBG_CRITICAL, "ipc(" << prog << "," << pid << "): WARNING: ipc_thread_2 didn't exit in 3 seconds.");
}
ipcacheRelease(ipcache_entry * i, bool dofree)
{
if (!i) {
- debugs(14, 0, "ipcacheRelease: Releasing entry with i=<NULL>");
+ debugs(14, DBG_CRITICAL, "ipcacheRelease: Releasing entry with i=<NULL>");
return;
}
if (!i || !i->hash.key) {
- debugs(14, 0, "ipcacheRelease: Releasing entry without hash link!");
+ debugs(14, DBG_CRITICAL, "ipcacheRelease: Releasing entry without hash link!");
return;
}
char buf[MAX_IPSTRLEN];
if (!sentry) {
- debugs(14, 0, HERE << "CRITICAL: sentry is NULL!");
+ debugs(14, DBG_CRITICAL, HERE << "CRITICAL: sentry is NULL!");
return;
}
if (!i) {
- debugs(14, 0, HERE << "CRITICAL: ipcache_entry is NULL!");
+ debugs(14, DBG_CRITICAL, HERE << "CRITICAL: ipcache_entry is NULL!");
storeAppendPrintf(sentry, "CRITICAL ERROR\n");
return;
}
#endif
if (geteuid() == 0) {
- debugs(0, 0, "Squid is not safe to run as root! If you must");
- debugs(0, 0, "start Squid as root, then you must configure");
- debugs(0, 0, "it to run as a non-priveledged user with the");
- debugs(0, 0, "'cache_effective_user' option in the config file.");
+ debugs(0, DBG_CRITICAL, "Squid is not safe to run as root! If you must");
+ debugs(0, DBG_CRITICAL, "start Squid as root, then you must configure");
+ debugs(0, DBG_CRITICAL, "it to run as a non-priveledged user with the");
+ debugs(0, DBG_CRITICAL, "'cache_effective_user' option in the config file.");
fatal("Don't run Squid as root, set 'cache_effective_user'!");
}
}
debugs(0, DBG_IMPORTANT, "Set Current Directory to " << Config.coredump_dir);
return;
} else {
- debugs(50, 0, "chdir: " << Config.coredump_dir << ": " << xstrerror());
+ debugs(50, DBG_CRITICAL, "chdir: " << Config.coredump_dir << ": " << xstrerror());
}
}
if (getcwd(pathbuf, MAXPATHLEN)) {
debugs(0, DBG_IMPORTANT, "Current Directory is " << pathbuf);
} else {
- debugs(50, 0, "WARNING: Can't find current directory, getcwd: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "WARNING: Can't find current directory, getcwd: " << xstrerror());
}
}
#endif
- debugs(1, 0, "Starting Squid Cache version " << version_string << " for " << CONFIG_HOST_TYPE << "...");
+ debugs(1, DBG_CRITICAL, "Starting Squid Cache version " << version_string << " for " << CONFIG_HOST_TYPE << "...");
#if _SQUID_WINDOWS_
if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) {
- debugs(1, 0, "Running as " << WIN32_Service_name << " Windows System Service on " << WIN32_OS_string);
- debugs(1, 0, "Service command line is: " << WIN32_Service_Command_Line);
+ debugs(1, DBG_CRITICAL, "Running as " << WIN32_Service_name << " Windows System Service on " << WIN32_OS_string);
+ debugs(1, DBG_CRITICAL, "Service command line is: " << WIN32_Service_Command_Line);
} else
- debugs(1, 0, "Running on " << WIN32_OS_string);
+ debugs(1, DBG_CRITICAL, "Running on " << WIN32_OS_string);
#endif
debugs(1, DBG_IMPORTANT, "Process ID " << getpid());
}
setEffectiveUser();
- debugs(0, 0, "Creating Swap Directories");
+ debugs(0, DBG_CRITICAL, "Creating Swap Directories");
Store::Root().create();
return 0;
if (kill(pid, 0) < 0)
return 0;
- debugs(0, 0, "Squid is already running! Process ID " << pid);
+ debugs(0, DBG_CRITICAL, "Squid is already running! Process ID " << pid);
return 1;
}
xmalloc_find_leaks();
- debugs(1, 0, "Memory used after shutdown: " << xmalloc_total);
+ debugs(1, DBG_CRITICAL, "Memory used after shutdown: " << xmalloc_total);
#endif
#if MEM_GEN_TRACE
fd = file_open(path, O_RDONLY | O_BINARY);
if (fd < 0) {
- debugs(25, 0, "mimeLoadIconFile: " << path << ": " << xstrerror());
+ debugs(25, DBG_CRITICAL, "mimeLoadIconFile: " << path << ": " << xstrerror());
return;
}
if (fstat(fd, &sb) < 0) {
- debugs(25, 0, "mimeLoadIconFile: FD " << fd << ": fstat: " << xstrerror());
+ debugs(25, DBG_CRITICAL, "mimeLoadIconFile: FD " << fd << ": fstat: " << xstrerror());
file_close(fd);
return;
}
int i;
if (ia == NULL) {
- debugs(7, 0, "comm_join_mcast_groups: Unknown host");
+ debugs(7, DBG_CRITICAL, "comm_join_mcast_groups: Unknown host");
return;
}
neighborIgnoreNonPeer(from, opcode);
} else if (p->stats.pings_acked > 100) {
if (100 * p->icp.counts[ICP_DENIED] / p->stats.pings_acked > 95) {
- debugs(15, 0, "95%% of replies from '" << p->host << "' are UDP_DENIED");
- debugs(15, 0, "Disabling '" << p->host << "', please check your configuration.");
+ debugs(15, DBG_CRITICAL, "95%% of replies from '" << p->host << "' are UDP_DENIED");
+ debugs(15, DBG_CRITICAL, "Disabling '" << p->host << "', please check your configuration.");
neighborRemove(p);
p = NULL;
} else {
} else if (opcode == ICP_MISS_NOFETCH) {
mem->ping_reply_callback(p, ntype, AnyP::PROTO_ICP, header, mem->ircb_data);
} else {
- debugs(15, 0, "neighborsUdpAck: Unexpected ICP reply: " << opcode_d);
+ debugs(15, DBG_CRITICAL, "neighborsUdpAck: Unexpected ICP reply: " << opcode_d);
}
}
p->n_addresses = 0;
if (ia == NULL) {
- debugs(0, 0, "WARNING: DNS lookup for '" << p->host << "' failed!");
+ debugs(0, DBG_CRITICAL, "WARNING: DNS lookup for '" << p->host << "' failed!");
return;
}
if ((int) ia->count < 1) {
- debugs(0, 0, "WARNING: No IP address found for '" << p->host << "'!");
+ debugs(0, DBG_CRITICAL, "WARNING: No IP address found for '" << p->host << "'!");
return;
}
{
pools = (PconnPool **) xcalloc(MAX_NUM_PCONN_POOLS, sizeof(*pools));
//TODO: re-link to MemPools. WAS: pconn_fds_pool = memPoolCreate("pconn_fds", PCONN_FDS_SZ * sizeof(int));
- debugs(48, 0, "persistent connection module initialized");
+ debugs(48, DBG_CRITICAL, "persistent connection module initialized");
registerWithCacheManager();
}
if (cblock.ver.required > cblock.ver.current ||
cblock.mask_size <= 0 || cblock.capacity <= 0 ||
cblock.bits_per_entry <= 0 || cblock.hash_func_count <= 0) {
- debugs(72, 0, "" << host << " digest cblock is corrupted.");
+ debugs(72, DBG_CRITICAL, "" << host << " digest cblock is corrupted.");
return 0;
}
/* check consistency further */
if ((size_t)cblock.mask_size != cacheDigestCalcMaskSize(cblock.capacity, cblock.bits_per_entry)) {
- debugs(72, 0, host << " digest cblock is corrupted " <<
+ debugs(72, DBG_CRITICAL, host << " digest cblock is corrupted " <<
"(mask size mismatch: " << cblock.mask_size << " ? " <<
cacheDigestCalcMaskSize(cblock.capacity, cblock.bits_per_entry)
<< ").");
/* there are some things we cannot do yet */
if (cblock.hash_func_count != CacheDigestHashFuncCount) {
- debugs(72, 0, "" << host << " digest: unsupported #hash functions: " <<
+ debugs(72, DBG_CRITICAL, "" << host << " digest: unsupported #hash functions: " <<
cblock.hash_func_count << " ? " << CacheDigestHashFuncCount << ".");
return 0;
}
const int bit_util = cacheDigestBitUtil(pd->cd);
if (bit_util > 65) {
- debugs(72, 0, "Warning: " << pd->host <<
+ debugs(72, DBG_CRITICAL, "Warning: " << pd->host <<
" peer digest has too many bits on (" << bit_util << "%%).");
return 0;
&ps->ping.timeout);
if (ps->ping.n_sent == 0)
- debugs(44, 0, "WARNING: neighborsUdpPing returned 0");
+ debugs(44, DBG_CRITICAL, "WARNING: neighborsUdpPing returned 0");
debugs(44, 3, "peerSelect: " << ps->ping.n_replies_expected <<
" ICP replies expected, RTT " << ps->ping.timeout <<
" msec");
else if (!strcmp(keytype, "LRU"))
heap_data->keyfunc = HeapKeyGen_StoreEntry_LRU;
else {
- debugs(81, 0, "createRemovalPolicy_heap: Unknown key type \"" << keytype << "\". Using LRU");
+ debugs(81, DBG_CRITICAL, "createRemovalPolicy_heap: Unknown key type \"" << keytype << "\". Using LRU");
heap_data->keyfunc = HeapKeyGen_StoreEntry_LRU;
}
int i = (int) statPctileSvc(0.5, 20, PCTILE_HTTP);
if (Config.warnings.high_rptm < i)
- debugs(18, 0, "WARNING: Median response time is " << i << " milliseconds");
+ debugs(18, DBG_CRITICAL, "WARNING: Median response time is " << i << " milliseconds");
}
if (Config.warnings.high_pf) {
i /= (int) dt;
if (Config.warnings.high_pf < i)
- debugs(18, 0, "WARNING: Page faults occuring at " << i << "/sec");
+ debugs(18, DBG_CRITICAL, "WARNING: Page faults occuring at " << i << "/sec");
}
}
#endif
if (Config.warnings.high_memory < i)
- debugs(18, 0, "WARNING: Memory usage at " << ((unsigned long int)(i >> 20)) << " MB");
+ debugs(18, DBG_CRITICAL, "WARNING: Memory usage at " << ((unsigned long int)(i >> 20)) << " MB");
}
}
mem_hdr::unlink(mem_node *aNode)
{
if (aNode->write_pending) {
- debugs(0, 0, "cannot unlink mem_node " << aNode << " while write_pending");
+ debugs(0, DBG_CRITICAL, "cannot unlink mem_node " << aNode << " while write_pending");
return false;
}
debugs(19, 6, "mem_hdr::write: " << this << " " << writeBuffer.range() << " object end " << endOffset());
if (unionNotEmpty(writeBuffer)) {
- debugs(19,0,"mem_hdr::write: writeBuffer: " << writeBuffer.range());
+ debugs(19, DBG_CRITICAL, "mem_hdr::write: writeBuffer: " << writeBuffer.range());
debugDump();
fatal("Attempt to overwrite already in-memory data. Preceeding this there should be a mem_hdr::write output that lists the attempted write, and the currently present data. Please get a 'backtrace full' from this error - using the generated core, and file a bug report with the squid developers including the last 10 lines of cache.log and the backtrace.\n");
PROF_stop(mem_hdr_write);
debugs(20, 3, "StoreEntry::replaceHttpReply: " << url());
if (!mem_obj) {
- debugs(20, 0, "Attempt to replace object with no in-memory representation");
+ debugs(20, DBG_CRITICAL, "Attempt to replace object with no in-memory representation");
return;
}
HttpReply *rep = (HttpReply *) entry->getReply(); // bypass const
if (!rep->parseCharBuf(copyInto.data, headersEnd(copyInto.data, len))) {
- debugs(90, 0, "Could not parse headers from on disk object");
+ debugs(90, DBG_CRITICAL, "Could not parse headers from on disk object");
} else {
parsed_header = 1;
}
#if SIZEOF_OFF_T <= 4
if (mem_obj->endOffset() > 0x7FFF0000) {
- debugs(20, 0, "WARNING: preventing off_t overflow for " << url());
+ debugs(20, DBG_CRITICAL, "WARNING: preventing off_t overflow for " << url());
abort();
return;
}
#if !HAVE_SIGACTION
if (signal(sig, sigusr2_handle) == SIG_ERR) /* reinstall */
- debugs(50, 0, "signal: sig=" << sig << " func=sigusr2_handle: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "signal: sig=" << sig << " func=sigusr2_handle: " << xstrerror());
#endif
}
#endif
if (setgid(Config2.effectiveGroupID) < 0)
- debugs(50, 0, "ALERT: setgid: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "ALERT: setgid: " << xstrerror());
}
if (!Config.effectiveGroup) {
if (setgid(Config2.effectiveGroupID) < 0)
- debugs(50, 0, "ALERT: setgid: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "ALERT: setgid: " << xstrerror());
if (initgroups(Config.effectiveUser, Config2.effectiveGroupID) < 0) {
- debugs(50, 0, "ALERT: initgroups: unable to set groups for User " <<
+ debugs(50, DBG_CRITICAL, "ALERT: initgroups: unable to set groups for User " <<
Config.effectiveUser << " and Group " <<
(unsigned) Config2.effectiveGroupID << "");
}
#if HAVE_SETRESUID
if (setresuid(Config2.effectiveUserID, Config2.effectiveUserID, 0) < 0)
- debugs(50, 0, "ALERT: setresuid: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "ALERT: setresuid: " << xstrerror());
#elif HAVE_SETEUID
if (seteuid(Config2.effectiveUserID) < 0)
- debugs(50, 0, "ALERT: seteuid: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "ALERT: seteuid: " << xstrerror());
#else
if (setuid(Config2.effectiveUserID) < 0)
- debugs(50, 0, "ALERT: setuid: " << xstrerror());
+ debugs(50, DBG_CRITICAL, "ALERT: setuid: " << xstrerror());
#endif
leave_suid();
if (fd < 0) {
- debugs(50, 0, "" << f << ": " << xstrerror());
+ debugs(50, DBG_CRITICAL, "" << f << ": " << xstrerror());
debug_trap("Could not write pid file");
return;
}
/* These ports are filtered in the default squid.conf, but
* maybe someone wants them hardcoded... */
if (port == 7 || port == 9 || port == 19) {
- debugs(23, 0, "urlParse: Deny access to port " << port);
+ debugs(23, DBG_CRITICAL, "urlParse: Deny access to port " << port);
return NULL;
}
#endif
/* Snarf the type */
if ((t = strtok(NULL, w_space)) == NULL) {
- debugs(80, 0, "wccp2ParseServiceInfo: missing service info type (standard|dynamic)");
+ debugs(80, DBG_CRITICAL, "wccp2ParseServiceInfo: missing service info type (standard|dynamic)");
self_destruct();
}
} else if (strcmp(t, "dynamic") == 0) {
service = WCCP2_SERVICE_DYNAMIC;
} else {
- debugs(80, 0, "wccp2ParseServiceInfo: bad service info type (expected standard|dynamic, got " << t << ")");
+ debugs(80, DBG_CRITICAL, "wccp2ParseServiceInfo: bad service info type (expected standard|dynamic, got " << t << ")");
self_destruct();
}