[svn] commit: r3569 - in /branches/vorner-recursor-dummylog/src/bin/recurse: main.cc recursor.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Nov 19 19:11:13 UTC 2010


Author: vorner
Date: Fri Nov 19 19:11:13 2010
New Revision: 3569

Log:
More logging messages in merged code

Modified:
    branches/vorner-recursor-dummylog/src/bin/recurse/main.cc
    branches/vorner-recursor-dummylog/src/bin/recurse/recursor.cc

Modified: branches/vorner-recursor-dummylog/src/bin/recurse/main.cc
==============================================================================
--- branches/vorner-recursor-dummylog/src/bin/recurse/main.cc (original)
+++ branches/vorner-recursor-dummylog/src/bin/recurse/main.cc Fri Nov 19 19:11:13 2010
@@ -165,6 +165,7 @@
 
         recursor->setConfigSession(config_session);
         recursor->updateConfig(config_session->getFullConfig());
+        dlog("Config loaded");
 
         dlog("Server started.");
         io_service.run();

Modified: branches/vorner-recursor-dummylog/src/bin/recurse/recursor.cc
==============================================================================
--- branches/vorner-recursor-dummylog/src/bin/recurse/recursor.cc (original)
+++ branches/vorner-recursor-dummylog/src/bin/recurse/recursor.cc Fri Nov 19 19:11:13 2010
@@ -90,9 +90,14 @@
         upstream_ = upstream;
         if (dnss) {
             if (upstream_.empty()) {
-                cerr << "[b10-recurse] Asked to do full recursive," << endl <<
-                    "but not implemented yet. I'll do nothing." << endl;
+                dlog("Asked to do full recursive, but not implemented yet."
+                    "I'll do nothing.");
             } else {
+                dlog("Setting forward addresses:");
+                BOOST_FOREACH(const addr_t& address, upstream) {
+                    dlog(" " + address.first + ":" +
+                        boost::lexical_cast<string>(address.second));
+                }
                 querySetup(*dnss);
             }
         }
@@ -530,6 +535,10 @@
 void
 Recursor::setListenAddresses(const vector<addr_t>& addresses) {
     try {
+        dlog("Setting listen addresses:");
+        BOOST_FOREACH(const addr_t& addr, addresses) {
+            dlog(" " + addr.first + boost::lexical_cast<string>(addr.second));
+        }
         setAddresses(dnss_, addresses);
         impl_->listen_ = addresses;
     }
@@ -545,8 +554,8 @@
             setAddresses(dnss_, impl_->listen_);
         }
         catch (const exception& e2) {
-            cerr << "[b10-recurse] Unable to recover from error: " << e.what()
-                << endl << "Rollback failed with: " << e2.what() << endl;
+            dlog("Unable to recover from error: " + e.what() +
+                "Rollback failed with: " + e2.what());
             abort();
         }
         throw e; // Let it fly a little bit further




More information about the bind10-changes mailing list