made DNS much less talkative
[pingcheck] / src / dns / dnscache.cpp
index b1c4f33..8e1b93f 100644 (file)
@@ -117,15 +117,15 @@ void DnsCache::schedule_save(const boost::system::error_code &error)
 
     if ( error ==  boost::asio::error::operation_aborted )   // cancelled
     {
-        GlobalLogger.error() << "DnsCache: SaveTimer was cancelled "
-                             << "--> no save and no re-schedule of saving!";
+        GlobalLogger.info() << "DnsCache: SaveTimer was cancelled "
+                            << "--> no save and no re-schedule of saving!";
         return;
     }
     else if (error)
     {
-        GlobalLogger.error() << "DnsCache: Received error " << error
-                             << " in schedule_save "
-                             << "--> no save now but re-schedule saving";
+        GlobalLogger.info() << "DnsCache: Received error " << error
+                            << " in schedule_save "
+                            << "--> no save now but re-schedule saving";
     }
     else
         save_to_cachefile();
@@ -141,7 +141,7 @@ void DnsCache::save_to_cachefile()
     if (!HasChanged)
         GlobalLogger.info() << "DnsCache: skip saving because has not changed";
     else if (CacheFile.empty())
-        GlobalLogger.warning()
+        GlobalLogger.info()
                            << "DnsCache: skip saving because file name empty!";
     else if (CacheFile == DoNotUseCacheFile)
         GlobalLogger.info() << "DnsCache: configured not to use cache file";
@@ -170,7 +170,7 @@ void DnsCache::save_to_cachefile()
 void DnsCache::load_from_cachefile()
 {
     if (CacheFile.empty())
-        GlobalLogger.warning()
+        GlobalLogger.info()
                    << "DnsCache: cannot load because cache file name is empty!";
     else if (CacheFile == DoNotUseCacheFile)
         GlobalLogger.info() << "DnsCache: configured not to use cache file";
@@ -212,7 +212,7 @@ std::string DnsCache::key_for_hostname(const std::string &hostname) const
 {
     if (hostname.empty())
     {
-        GlobalLogger.warning() << "DnsCache: empty host!";
+        GlobalLogger.info() << "DnsCache: empty host!";
         return "";
     }
 
@@ -230,7 +230,7 @@ void DnsCache::update(const std::string &hostname,
     std::string key = key_for_hostname(hostname);
     if ( !get_cname(hostname).Host.empty() )
     {   // ensure that there is never IP and CNAME for the same host
-        GlobalLogger.warning() << "DnsCache: Saving IPs for " << key
+        GlobalLogger.info() << "DnsCache: Saving IPs for " << key
             << " removes CNAME to " << get_cname(hostname).Host << "!";
         update(hostname, Cname());   // overwrite with "empty" cname
     }
@@ -264,7 +264,7 @@ void DnsCache::update(const std::string &hostname,
     std::string key = key_for_hostname(hostname);
     if ( !get_ips(hostname).empty() )
     {   // ensure that there is never IP and CNAME for the same host
-        GlobalLogger.warning() << "DnsCache: Saving CNAME for " << key
+        GlobalLogger.info() << "DnsCache: Saving CNAME for " << key
             << " removes " << get_ips(hostname).size() << " IPs for same host!";
         update(hostname, HostAddressVec());   // overwrite with empty IP list
     }
@@ -379,8 +379,9 @@ HostAddressVec DnsCache::get_ips_recursive(const std::string &hostname,
         current_host = key_for_hostname(current_cname.Host);
         if (++n_recursions >= max_recursion_count)
         {
-            GlobalLogger.warning() << "DnsCache: reached recursion limit of "
-                << n_recursions << " in recursive IP retrieval!";
+            GlobalLogger.info() << "DnsCache: reached recursion limit of "
+                << n_recursions << " in recursive IP retrieval of "
+                << hostname << "!";
             break;
         }
         else
@@ -433,8 +434,9 @@ std::string DnsCache::get_first_outdated_cname(const std::string &hostname,
     {
         if (++n_recursions >= max_recursion_count)
         {
-            GlobalLogger.warning() << "DnsCache: reached recursion limit of "
-                << n_recursions << " in search of outdated CNAMEs!";
+            GlobalLogger.info() << "DnsCache: reached recursion limit of "
+                << n_recursions << " in search of outdated CNAMEs for "
+                << hostname << "!";
             return first_outdated;   // not really out of date but currently
         }                            // our best guess