re-raise a little output in cache: state newly acquired IPs and CNAMEs
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 6 May 2015 16:12:57 +0000 (18:12 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 6 May 2015 16:12:57 +0000 (18:12 +0200)
src/dns/dnscache.cpp

index 8e1b93f..d7c8182 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "dns/dnscache.h"
 
+#include <sstream>
 #include <fstream>
 #include <logfunc.hpp>
 #include <filefunc.hxx>   // 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;