const int max_address_resolution_attempts,
const std::string &cache_file)
{
- GlobalLogger.info() << "Creating DNS Cache";
+ GlobalLogger.info() << "DnsMaster: Creating cache";
DnsCacheItem cache( new DnsCache(io_serv, cache_file) );
create_master(io_serv, default_name_server, resolved_ip_ttl_threshold,
max_address_resolution_attempts, cache);
{
if (TheOnlyInstance)
{
- GlobalLogger.warning()
- << "Blocking attempt to create another DnsMaster instance!";
+ GlobalLogger.warning() << "DnsMaster: "
+ << "Blocking attempt to create another instance!";
return;
}
- GlobalLogger.info() << "Creating DNS Master";
+ GlobalLogger.info() << "DNS Master: creating instance";
TheOnlyInstance.reset( new DnsMaster(io_serv,
default_name_server,
resolved_ip_ttl_threshold,
DnsMasterItem& DnsMaster::get_instance()
{
if ( !TheOnlyInstance )
- GlobalLogger.error()
- << "Request to return DnsMaster instance before creating it!";
+ GlobalLogger.error() << "DnsMaster: "
+ << "Request to return instance before creating it!";
return TheOnlyInstance;
}
DnsMaster::~DnsMaster()
{
- GlobalLogger.info() << "DnsMaster is being destructed";
+ GlobalLogger.info() << "DnsMaster: being destructed";
if (DnsMaster::TheOnlyInstance)
{ // apparently, this static variable still exists while itself is
// destructed...
- //GlobalLogger.warning() << "DnsMaster is being destructed that is not "
+ //GlobalLogger.warning() << "DnsMaster: being destructed but not "
// << "singleton instance TheOnlyInstance!";
DnsMaster::TheOnlyInstance.reset();
}
= boost::asio::ip::address::from_string(hostname);
if ( (protocol == DNS_IPv4 && !ip.is_v4()) ||
(protocol == DNS_IPv6 && !ip.is_v6()) )
- GlobalLogger.warning() << "Asked to create a DNS resolver "
+ GlobalLogger.warning() << "DnsMaster:"
+ << "Asked to create a DNS resolver "
<< "for wrong IP protocol: v4 != v6! "
<< "We will comply.";
- GlobalLogger.info() << "Creating PseudoResolver for IP " << ip;
+ GlobalLogger.info() << "DnsMaster: Creating PseudoResolver for IP "
+ << ip;
ResolverItem new_resolver( new IpPseudoResolver(IoService,
hostname,
Cache) );
case PingProtocol_TCP: return DNS_IPv4; break;
case PingProtocol_TCP_IPv6: return DNS_IPv6; break;
default:
- GlobalLogger.warning() << "Unexpected ping protocol: "
+ GlobalLogger.warning() << "DnsMaster: Unexpected ping protocol: "
<< static_cast<int>(pprot);
return DNS_IPALL;
break;
return "Unexpected Protocol"; break;
}
}
-// (created using vim -- the world's best text editor)
-