Browse Source

[trac1035] Change message IDs to words separated by underscores

Stephen Morris 14 years ago
parent
commit
6661b327d2

+ 2 - 2
src/lib/nsas/nameserver_address_store.cc

@@ -86,7 +86,7 @@ NameserverAddressStore::lookup(const string& zone, const RRClass& class_code,
     boost::shared_ptr<AddressRequestCallback> callback, AddressFamily family,
     boost::shared_ptr<AddressRequestCallback> callback, AddressFamily family,
     const GlueHints& glue_hints)
     const GlueHints& glue_hints)
 {
 {
-    LOG_DEBUG(nsas_logger, NSAS_DBG_TRACE, NSAS_LOOKUPZONE).arg(zone);
+    LOG_DEBUG(nsas_logger, NSAS_DBG_TRACE, NSAS_SEARCH_ZONE_NS).arg(zone);
 
 
     pair<bool, boost::shared_ptr<ZoneEntry> > zone_obj(
     pair<bool, boost::shared_ptr<ZoneEntry> > zone_obj(
         zone_hash_->getOrAdd(HashKey(zone, class_code),
         zone_hash_->getOrAdd(HashKey(zone, class_code),
@@ -107,7 +107,7 @@ NameserverAddressStore::cancel(const string& zone,
     const boost::shared_ptr<AddressRequestCallback>& callback,
     const boost::shared_ptr<AddressRequestCallback>& callback,
     AddressFamily family)
     AddressFamily family)
 {
 {
-    LOG_DEBUG(nsas_logger, NSAS_DBG_TRACE, NSAS_LOOKUPCANCEL).arg(zone);
+    LOG_DEBUG(nsas_logger, NSAS_DBG_TRACE, NSAS_LOOKUP_CANCEL).arg(zone);
 
 
     boost::shared_ptr<ZoneEntry> entry(zone_hash_->get(HashKey(zone,
     boost::shared_ptr<ZoneEntry> entry(zone_hash_->get(HashKey(zone,
                                                                class_code)));
                                                                class_code)));

+ 4 - 4
src/lib/nsas/nameserver_entry.cc

@@ -179,7 +179,7 @@ NameserverEntry::updateAddressRTTAtIndex(uint32_t rtt, size_t index,
         new_rtt = 1;
         new_rtt = 1;
     }
     }
     addresses_[family][index].setRTT(new_rtt);
     addresses_[family][index].setRTT(new_rtt);
-    LOG_DEBUG(nsas_logger, NSAS_DBG_RTT, NSAS_SETRTT)
+    LOG_DEBUG(nsas_logger, NSAS_DBG_RTT, NSAS_UPDATE_RTT)
               .arg(addresses_[family][index].getAddress().toText())
               .arg(addresses_[family][index].getAddress().toText())
               .arg(old_rtt).arg(new_rtt);
               .arg(old_rtt).arg(new_rtt);
 }
 }
@@ -234,7 +234,7 @@ class NameserverEntry::ResolverCallback :
             if (!response_message ||
             if (!response_message ||
                 response_message->getRcode() != isc::dns::Rcode::NOERROR() ||
                 response_message->getRcode() != isc::dns::Rcode::NOERROR() ||
                 response_message->getRRCount(isc::dns::Message::SECTION_ANSWER) == 0) {
                 response_message->getRRCount(isc::dns::Message::SECTION_ANSWER) == 0) {
-                LOG_ERROR(nsas_logger, NSAS_INVRESPSTR).arg(entry_->getName());
+                LOG_ERROR(nsas_logger, NSAS_INVALID_RESPONSE).arg(entry_->getName());
                 failureInternal(lock);
                 failureInternal(lock);
                 return;
                 return;
             }
             }
@@ -249,7 +249,7 @@ class NameserverEntry::ResolverCallback :
                 response->getClass() != RRClass(entry_->getClass()))
                 response->getClass() != RRClass(entry_->getClass()))
             {
             {
                 // Invalid response type or class
                 // Invalid response type or class
-                LOG_ERROR(nsas_logger, NSAS_INVRESPTC)
+                LOG_ERROR(nsas_logger, NSAS_WRONG_ANSWER)
                           .arg(entry_->getName()).arg(type_)
                           .arg(entry_->getName()).arg(type_)
                           .arg(entry_->getClass()).arg(response->getType())
                           .arg(entry_->getClass()).arg(response->getType())
                           .arg(response->getClass());
                           .arg(response->getClass());
@@ -437,7 +437,7 @@ NameserverEntry::askIP(isc::resolve::ResolverInterface* resolver,
         // We are unlocked here, as the callback from that might want to lock
         // We are unlocked here, as the callback from that might want to lock
         lock.unlock();
         lock.unlock();
 
 
-        LOG_DEBUG(nsas_logger, NSAS_DBG_TRACE, NSAS_NSADDR).arg(getName());
+        LOG_DEBUG(nsas_logger, NSAS_DBG_TRACE, NSAS_FIND_NS_ADDRESS).arg(getName());
         askIP(resolver, RRType::A(), V4_ONLY);
         askIP(resolver, RRType::A(), V4_ONLY);
         askIP(resolver, RRType::AAAA(), V6_ONLY);
         askIP(resolver, RRType::AAAA(), V6_ONLY);
         // Make sure we end the routine when we are not locked
         // Make sure we end the routine when we are not locked

+ 7 - 7
src/lib/nsas/nsas_messages.mes

@@ -14,7 +14,7 @@
 
 
 $NAMESPACE isc::nsas
 $NAMESPACE isc::nsas
 
 
-% NSAS_INVRESPSTR      queried for %1 but got invalid response
+% NSAS_INVALID_RESPONSE      queried for %1 but got invalid response
 This message indicates an internal error in the nameserver address store
 This message indicates an internal error in the nameserver address store
 component (NSAS) of the resolver.  The NSAS made a query for a RR for the
 component (NSAS) of the resolver.  The NSAS made a query for a RR for the
 specified nameserver but received an invalid response.  Either the success
 specified nameserver but received an invalid response.  Either the success
@@ -22,20 +22,20 @@ function was called without a DNS message or the message was invalid on some
 way. (In the latter case, the error should have been picked up elsewhere in
 way. (In the latter case, the error should have been picked up elsewhere in
 the processing logic, hence the raising of the error here.)
 the processing logic, hence the raising of the error here.)
 
 
-% NSAS_INVRESPTC       queried for %1 RR of type/class %2/%3, received response %4/%5
+% NSAS_WRONG_ANSWER       queried for %1 RR of type/class %2/%3, received response %4/%5
 This message indicates an internal error in the nameserver address store
 This message indicates an internal error in the nameserver address store
 component (NSAS) of the resolver.  The NSAS made a query for the given RR
 component (NSAS) of the resolver.  The NSAS made a query for the given RR
 type and class, but instead received an answer with the given type and class.
 type and class, but instead received an answer with the given type and class.
 
 
-% NSAS_LOOKUPCANCEL    lookup for zone %1 has been cancelled
+% NSAS_LOOKUP_CANCEL    lookup for zone %1 has been canceled
 A debug message, this is output when a NSAS (nameserver address store -
 A debug message, this is output when a NSAS (nameserver address store -
-part of the resolver) lookup for a zone has been cancelled.
+part of the resolver) lookup for a zone has been canceled.
 
 
-% NSAS_LOOKUPZONE      searching NSAS for nameservers for zone %1
+% NSAS_SEARCH_ZONE_NS      searching NSAS for nameservers for zone %1
 A debug message, this is output when a call is made to the nameserver address
 A debug message, this is output when a call is made to the nameserver address
 store (part of the resolver) to obtain the nameservers for the specified zone.
 store (part of the resolver) to obtain the nameservers for the specified zone.
 
 
-% NSAS_NSADDR          asking resolver to obtain A and AAAA records for %1
+% NSAS_FIND_NS_ADDRESS          asking resolver to obtain A and AAAA records for %1
 A debug message, the NSAS (nameserver address store - part of the resolver) is
 A debug message, the NSAS (nameserver address store - part of the resolver) is
 making a callback into the resolver to retrieve the address records for the
 making a callback into the resolver to retrieve the address records for the
 specified nameserver.
 specified nameserver.
@@ -51,7 +51,7 @@ A debug message, the NSAS (nameserver address store - part of the resolver)
 has retrieved the given address for the specified nameserver through an
 has retrieved the given address for the specified nameserver through an
 external query.
 external query.
 
 
-% NSAS_SETRTT          reporting RTT for %1 as %2; new value is now %3
+% NSAS_UPDATE_RTT          update RTT for %1: was %2 ms, is now %3 ms
 A NSAS (nameserver address store - part of the resolver) debug message
 A NSAS (nameserver address store - part of the resolver) debug message
 reporting the round-trip time (RTT) for a query made to the specified
 reporting the round-trip time (RTT) for a query made to the specified
 nameserver.  The RTT has been updated using the value given and the new RTT is
 nameserver.  The RTT has been updated using the value given and the new RTT is