BIND 10 trac745, updated. ceef68cd1223ae14d8412adbe18af2812ade8c2d [trac745] remove to toText() calls in debug output

BIND 10 source code commits bind10-changes at lists.isc.org
Tue May 10 12:57:10 UTC 2011


The branch, trac745 has been updated
       via  ceef68cd1223ae14d8412adbe18af2812ade8c2d (commit)
      from  33cd7d9232078f70aa380309a3615a1a9d743988 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ceef68cd1223ae14d8412adbe18af2812ade8c2d
Author: Stephen Morris <stephen at isc.org>
Date:   Tue May 10 13:53:49 2011 +0100

    [trac745] remove to toText() calls in debug output
    
    When logging, the conversion of the parameters to string is done via
    boost::lexical_cast.  This uses operator<<(), so if the object has
    that function defined for it, there is no need to explicitly call
    the object's toText() method when passing it as a logging parameter.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/nsas/nameserver_entry.cc |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/nsas/nameserver_entry.cc b/src/lib/nsas/nameserver_entry.cc
index 3432856..65b2ec2 100644
--- a/src/lib/nsas/nameserver_entry.cc
+++ b/src/lib/nsas/nameserver_entry.cc
@@ -181,8 +181,7 @@ NameserverEntry::updateAddressRTTAtIndex(uint32_t rtt, size_t index,
     addresses_[family][index].setRTT(new_rtt);
     LOG_DEBUG(nsas_logger, NSAS_DBG_RTT, NSAS_SETRTT)
               .arg(addresses_[family][index].getAddress().toText())
-              .arg(old_rtt)
-              .arg(new_rtt);
+              .arg(old_rtt).arg(new_rtt);
 }
 
 void
@@ -251,11 +250,9 @@ class NameserverEntry::ResolverCallback :
             {
                 // Invalid response type or class
                 LOG_ERROR(nsas_logger, NSAS_INVRESPTC)
-                          .arg(entry_->getName())
-                          .arg(type_.toText())
-                          .arg(RRClass(entry_->getClass()).toText())
-                          .arg(response->getType().toText())
-                          .arg(response->getClass().toText());
+                          .arg(entry_->getName()).arg(type_)
+                          .arg(entry_->getClass()).arg(response->getType())
+                          .arg(response->getClass());
 
                 failureInternal(lock);
                 return;
@@ -280,8 +277,7 @@ class NameserverEntry::ResolverCallback :
                 entries.push_back(found ? *found : AddressEntry(
                                                    IOAddress(address), 1));
                 LOG_DEBUG(nsas_logger, NSAS_DBG_RESULTS, NSAS_NSLKUPSUCC)
-                          .arg(address)
-                          .arg(entry_->getName());
+                          .arg(address).arg(entry_->getName());
             }
 
             // We no longer need the previous set of addresses, we have
@@ -327,8 +323,7 @@ class NameserverEntry::ResolverCallback :
          */
         virtual void failure() {
             LOG_DEBUG(nsas_logger, NSAS_DBG_RESULTS, NSAS_NSLKUPFAIL)
-                      .arg(type_.toText())
-                      .arg(entry_->getName());
+                      .arg(type_).arg(entry_->getName());
             Lock lock(entry_->mutex_);
             failureInternal(lock);
         }




More information about the bind10-changes mailing list