From f636ba88fed5f97e023880f30d134b78e1081c0c Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Wed, 6 May 2015 18:12:57 +0200 Subject: [PATCH] re-raise a little output in cache: state newly acquired IPs and CNAMEs --- src/dns/dnscache.cpp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dns/dnscache.cpp b/src/dns/dnscache.cpp index 8e1b93f..d7c8182 100644 --- a/src/dns/dnscache.cpp +++ b/src/dns/dnscache.cpp @@ -22,6 +22,7 @@ #include "dns/dnscache.h" +#include #include #include #include // I2n::file_exists @@ -250,8 +251,12 @@ void DnsCache::update(const std::string &hostname, ips_checked.push_back(addr); } - GlobalLogger.info() << "DnsCache: update IPs for " << key - << " to " << ips_checked.size() << "-list"; + stringstream log_temp; + log_temp << "DnsCache: update IPs for " << key << " to " + << ips_checked.size() << "-list: "; + BOOST_FOREACH( const HostAddress &ip, ips_checked ) + log_temp << ip.get_ip() << ", "; + GlobalLogger.notice() << log_temp.str(); IpCache[key] = ips_checked; HasChanged = true; @@ -282,7 +287,7 @@ void DnsCache::update(const std::string &hostname, to_save.Ttl = TimeToLive(MinTimeBetweenResolves); } - GlobalLogger.info() << "DnsCache: update CNAME for " << key + GlobalLogger.notice() << "DnsCache: update CNAME for " << key << " to " << to_save.Host; CnameCache[key] = to_save; HasChanged = true; -- 1.7.1