And fix a few typos while we're at it.
m_ttl = (uint32_t) strtol( m_result["dNSTTL"][0].c_str(), &endptr, 10 );
if( *endptr != '\0' )
{
- L << Logger::Warning << m_myname << " Invalid time to life for " << m_qname << ": " << m_result["dNSTTL"][0] << endl;
+ L << Logger::Warning << m_myname << " Invalid time to live for " << m_qname << ": " << m_result["dNSTTL"][0] << endl;
m_ttl = m_default_ttl;
}
m_result.erase( "dNSTTL" );
return;
}
catch(PDNSException &ae) {
- L<<Logger::Warning<<kBackendId<<" unable to receive data from coprocess. "<<ae.reason<<endl;
+ L<<Logger::Warning<<kBackendId<<" Unable to receive data from coprocess. "<<ae.reason<<endl;
delete d_cp;
d_cp=0;
throw;
vector<string>parts;
stringtok(parts,line,"\t");
if(parts.empty()) {
- L<<Logger::Error<<kBackendId<<" coprocess returned emtpy line in query for "<<d_qname<<endl;
+ L<<Logger::Error<<kBackendId<<" Coprocess returned empty line in query for "<<d_qname<<endl;
throw PDNSException("Format error communicating with coprocess");
}
else if(parts[0]=="FAIL") {
}
else if(parts[0]=="DATA") { // yay
if(parts.size() < 7 + extraFields) {
- L<<Logger::Error<<kBackendId<<" coprocess returned incomplete or empty line in data section for query for "<<d_qname<<endl;
+ L<<Logger::Error<<kBackendId<<" Coprocess returned incomplete or empty line in data section for query for "<<d_qname<<endl;
throw PDNSException("Format error communicating with coprocess in data section");
// now what?
}
}
else {
if(parts.size()< 8 + extraFields) {
- L<<Logger::Error<<kBackendId<<" coprocess returned incomplete MX/SRV line in data section for query for "<<d_qname<<endl;
+ L<<Logger::Error<<kBackendId<<" Coprocess returned incomplete MX/SRV line in data section for query for "<<d_qname<<endl;
throw PDNSException("Format error communicating with coprocess in data section of MX/SRV record");
}
if (messages.IsArray()) {
// log em all
for (rapidjson::Value::ValueIterator iter = messages.Begin(); iter != messages.End(); ++iter)
- L<<Logger::Info<<"[remotebackend]:"<< getString(*iter) <<std::endl;
+ L<<Logger::Info<<"[remotebackend]: "<< getString(*iter) <<std::endl;
} else if (messages.IsNull() == false) { // could be just a value
- L<<Logger::Info<<"[remotebackend]:"<< getString(messages) <<std::endl;
+ L<<Logger::Info<<"[remotebackend]: "<< getString(messages) <<std::endl;
}
}
return rv;
// make sure we got zone & kind
if (!answer["result"].IsObject() || !answer["result"].HasMember("zone")) {
- L<<Logger::Error<<kBackendId<<"Missing zone in getDomainInfo return value"<<endl;
+ L<<Logger::Error<<kBackendId<<" Missing zone in getDomainInfo return value"<<endl;
throw PDNSException();
}
value = -1;
query.AddMember("parameters", parameters, query.GetAllocator());
if (this->send(query) == false || this->recv(answer) == false) {
- L<<Logger::Error<<kBackendId<<"Failed to execute RPC for RemoteBackend::setNotified("<<id<<","<<serial<<")"<<endl;
+ L<<Logger::Error<<kBackendId<<" Failed to execute RPC for RemoteBackend::setNotified("<<id<<","<<serial<<")"<<endl;
}
}
res=UeberBackend::loadmodule(arg()["module-dir"]+"/"+module);
if(res==false) {
- L<<Logger::Error<<"dnsbackend unable to load module in "<<module<<endl;
+ L<<Logger::Error<<"DNSBackend unable to load module in "<<module<<endl;
exit(1);
}
}
}
if(!sd.serial) { // magic time!
- DLOG(L<<Logger::Warning<<"Doing soa serialnumber autocalculation for "<<rr.qname<<endl);
+ DLOG(L<<Logger::Warning<<"Doing SOA serial number autocalculation for "<<rr.qname<<endl);
time_t serial;
if (calculateSOASerial(domain, sd, serial)) {
if(!mkdir(socketname.c_str(),0700)) // make /var directory, if needed
L<<Logger::Warning<<"Created local state directory '"<<socketname<<"'"<<endl;
else if(errno!=EEXIST) {
- L<<Logger::Critical<<"FATAL: Unable to create socket directory ("<<socketname<<") and it does not exist yet"<<endl;
+ L<<Logger::Critical<<"Unable to create socket directory ("<<socketname<<") and it does not exist yet"<<endl;
exit(1);
}
const ComboAddress caIp(*k, 53);
if(!d_preventSelfNotification || !AddressIsUs(caIp)) {
if(!d_onlyNotify.match(&caIp))
- L<<Logger::Info<<"Skiped notification of domain '"<<domain<<"' to "<<*j<<" because it does not match only-notify."<<endl;
+ L<<Logger::Info<<"Skipped notification of domain '"<<domain<<"' to "<<*j<<" because it does not match only-notify."<<endl;
else
ips.insert(caIp.toStringWithPort());
}
#ifdef SO_TIMESTAMP
int on=1;
if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP, (char*)&on, sizeof(on)) < 0 )
- L<<Logger::Error<<"Warning: unable to enable timestamp reporting for socket"<<endl;
+ L<<Logger::Error<<"Unable to enable timestamp reporting for socket"<<endl;
#endif
}
s=socket(AF_INET,SOCK_DGRAM,0);
if(s<0) {
- L<<Logger::Error<<"Unable to acquire a UDP socket: "+string(strerror(errno)) << endl;
+ L<<Logger::Error<<"Unable to acquire UDP socket: "+string(strerror(errno)) << endl;
throw PDNSException("Unable to acquire a UDP socket: "+string(strerror(errno)));
}
L<<Logger::Error<<"IPv4 Address " << localname << " does not exist on this server - skipping UDP bind" << endl;
continue;
} else {
- L<<Logger::Error<<"binding UDP socket to '"+locala.toStringWithPort()+"': "<<binderror<<endl;
+ L<<Logger::Error<<"Unable to bind UDP socket to '"+locala.toStringWithPort()+"': "<<binderror<<endl;
throw PDNSException("Unable to bind to UDP socket");
}
}
s=socket(AF_INET6,SOCK_DGRAM,0);
if(s<0) {
- L<<Logger::Error<<"Unable to acquire a UDPv6 socket: "+string(strerror(errno)) << endl;
- throw PDNSException("Unable to acquire a UDPv6 socket: "+string(strerror(errno)));
+ L<<Logger::Error<<"Unable to acquire UDPv6 socket: "+string(strerror(errno)) << endl;
+ throw PDNSException("Unable to acquire UDPv6 socket: "+string(strerror(errno)));
}
Utility::setCloseOnExec(s);
L<<Logger::Error<<"IPv6 Address " << localname << " does not exist on this server - skipping UDP bind" << endl;
continue;
} else {
- L<<Logger::Error<<"binding to UDP ipv6 socket "<< localname <<": "<<strerror(errno)<<endl;
- throw PDNSException("Unable to bind to UDP ipv6 socket");
+ L<<Logger::Error<<"Unable to bind to UDPv6 socket "<< localname <<": "<<strerror(errno)<<endl;
+ throw PDNSException("Unable to bind to UDPv6 socket");
}
}
d_sockets.push_back(s);
addRootReferral(r);
}
else {
- DLOG(L<<Logger::Warning<<"setting 'No Error'"<<endl);
+ DLOG(L<<Logger::Warning<<"Setting 'No Error'"<<endl);
}
goto sendit;
}
}
if (setsockopt(fd, SOL_SOCKET, optname, (char*)&size, sizeof(size)) < 0 )
- L<<Logger::Error<<"Warning: unable to raise socket buffer size to "<<size<<": "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Unable to raise socket buffer size to "<<size<<": "<<strerror(errno)<<endl;
}
if(of)
of<< Utility::getpid() <<endl;
else
- L<<Logger::Error<<"Requested to write pid for "<<Utility::getpid()<<" to "<<s_pidfname<<" failed: "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Writing pid for "<<Utility::getpid()<<" to "<<s_pidfname<<" failed: "<<strerror(errno)<<endl;
}
typedef map<ComboAddress, uint32_t, ComboAddress::addressOnlyLessThan> tcpClientCounts_t;
}
catch(std::exception& e)
{
- L<<Logger::Error<<"reloading ACLs failed (Exception: "<<e.what()<<")"<<endl;
+ L<<Logger::Error<<"Reloading ACLs failed (Exception: "<<e.what()<<")"<<endl;
return e.what() + string("\n");
}
catch(PDNSException& ae)
{
- L<<Logger::Error<<"reloading ACLs failed (PDNSException: "<<ae.reason<<")"<<endl;
+ L<<Logger::Error<<"Reloading ACLs failed (PDNSException: "<<ae.reason<<")"<<endl;
return ae.reason + string("\n");
}
return "ok\n";
if(of)
of<<getpid()<<endl;
else
- L<<Logger::Error<<"Requested to write pid for "<<getpid()<<" to "<<fname<<" failed: "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Writing pid for "<<getpid()<<" to "<<fname<<" failed: "<<strerror(errno)<<endl;
}
int g_fd1[2], g_fd2[2];
exit(1);
}
setStatus("Child died with code "+itoa(ret));
- L<<Logger::Error<<"Our pdns instance exited with code "<<ret<<endl;
- L<<Logger::Error<<"Respawning"<<endl;
+ L<<Logger::Error<<"Our pdns instance exited with code "<<ret<<", respawning"<<endl;
sleep(1);
continue;
res=UeberBackend::loadmodule(::arg()["module-dir"]+"/"+module);
if(res==false) {
- L<<Logger::Error<<"receiver unable to load module "<<module<<endl;
+ L<<Logger::Error<<"Receiver unable to load module "<<module<<endl;
exit(1);
}
}
return "ok\n";
}
catch(std::exception& e) {
- L<<Logger::Error<<"Had error reloading zones, keeping original data: "<<e.what()<<endl;
+ L<<Logger::Error<<"Encountered error reloading zones, keeping original data: "<<e.what()<<endl;
}
catch(PDNSException& ae) {
L<<Logger::Error<<"Encountered error reloading zones, keeping original data: "<<ae.reason<<endl;
return 0;
}
catch(...) {
- L<<Logger::Error<<"unknown exception in signing thread occurred"<<endl;
+ L<<Logger::Error<<"Unknown exception in signing thread occurred"<<endl;
return 0;
}
L<<Logger::Error<<"IPv4 Address " << *laddr << " does not exist on this server - skipping TCP bind" << endl;
continue;
} else {
- L<<Logger::Error<<"binding to TCP socket " << *laddr << ": "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Unable to bind to TCP socket " << *laddr << ": "<<strerror(errno)<<endl;
throw PDNSException("Unable to bind to TCP socket");
}
}
L<<Logger::Error<<"IPv6 Address " << *laddr << " does not exist on this server - skipping TCP bind" << endl;
continue;
} else {
- L<<Logger::Error<<"binding to TCPv6 socket" << *laddr << ": "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Unable to bind to TCPv6 socket" << *laddr << ": "<<strerror(errno)<<endl;
throw PDNSException("Unable to bind to TCPv6 socket");
}
}