Parcourir la source

[2108] Add unique prefix to datasrc::memory message IDs

Mukund Sivaraman il y a 12 ans
Parent
commit
8716a098a9
2 fichiers modifiés avec 29 ajouts et 29 suppressions
  1. 14 14
      src/lib/datasrc/memory/memory_client.cc
  2. 15 15
      src/lib/datasrc/memory/memory_messages.mes

+ 14 - 14
src/lib/datasrc/memory/memory_client.cc

@@ -147,7 +147,7 @@ public:
              l > origin_labels;
              --l, wname = wname.split(1)) {
             if (wname.isWildcard()) {
-                LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_ADD_WILDCARD).
+                LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_MEM_ADD_WILDCARD).
                     arg(name);
 
                 // Ensure a separate level exists for the "wildcarding" name,
@@ -180,7 +180,7 @@ public:
         if (rrset.getType() == RRType::CNAME()) {
             for (const RdataSet* sp = set; sp != NULL; sp = sp->getNext()) {
                 if (sp->type != RRType::NSEC()) {
-                    LOG_ERROR(logger, DATASRC_MEM_CNAME_TO_NONEMPTY).
+                    LOG_ERROR(logger, DATASRC_MEMORY_MEM_CNAME_TO_NONEMPTY).
                         arg(rrset.getName());
                     isc_throw(AddError, "CNAME can't be added with "
                               << sp->type << " RRType for "
@@ -189,7 +189,7 @@ public:
             }
         } else if ((rrset.getType() != RRType::NSEC()) &&
                    (RdataSet::find(set, RRType::CNAME()) != NULL)) {
-            LOG_ERROR(logger, DATASRC_MEM_CNAME_COEXIST).arg(rrset.getName());
+            LOG_ERROR(logger, DATASRC_MEMORY_MEM_CNAME_COEXIST).arg(rrset.getName());
             isc_throw(AddError, "CNAME and " << rrset.getType() <<
                       " can't coexist for " << rrset.getName());
         }
@@ -207,7 +207,7 @@ public:
             (rrset.getType() == RRType::NS() &&
              RdataSet::find(set, RRType::DNAME()) != NULL)))
         {
-            LOG_ERROR(logger, DATASRC_MEM_DNAME_NS).arg(rrset.getName());
+            LOG_ERROR(logger, DATASRC_MEMORY_MEM_DNAME_NS).arg(rrset.getName());
             isc_throw(AddError, "DNAME can't coexist with NS in non-apex "
                 "domain " << rrset.getName());
         }
@@ -233,7 +233,7 @@ public:
             // XXX: this is not only for CNAME or DNAME. We should generalize
             // this code for all other "singleton RR types" (such as SOA) in a
             // separate task.
-            LOG_ERROR(logger, DATASRC_MEM_SINGLETON).arg(rrset->getName()).
+            LOG_ERROR(logger, DATASRC_MEMORY_MEM_SINGLETON).arg(rrset->getName()).
                 arg(rrset->getType());
             isc_throw(AddError, "multiple RRs of singleton type for "
                       << rrset->getName());
@@ -251,7 +251,7 @@ public:
         if (compare.getRelation() != NameComparisonResult::SUPERDOMAIN &&
             compare.getRelation() != NameComparisonResult::EQUAL)
         {
-            LOG_ERROR(logger, DATASRC_MEM_OUT_OF_ZONE).arg(rrset->getName()).
+            LOG_ERROR(logger, DATASRC_MEMORY_MEM_OUT_OF_ZONE).arg(rrset->getName()).
                 arg(zone_name);
             isc_throw(OutOfZone, "The name " << rrset->getName() <<
                 " is not contained in zone " << zone_name);
@@ -267,13 +267,13 @@ public:
         // behavior.
         if (rrset->getName().isWildcard()) {
             if (rrset->getType() == RRType::NS()) {
-                LOG_ERROR(logger, DATASRC_MEM_WILDCARD_NS).
+                LOG_ERROR(logger, DATASRC_MEMORY_MEM_WILDCARD_NS).
                     arg(rrset->getName());
                 isc_throw(AddError, "Invalid NS owner name (wildcard): " <<
                           rrset->getName());
             }
             if (rrset->getType() == RRType::DNAME()) {
-                LOG_ERROR(logger, DATASRC_MEM_WILDCARD_DNAME).
+                LOG_ERROR(logger, DATASRC_MEMORY_MEM_WILDCARD_DNAME).
                     arg(rrset->getName());
                 isc_throw(AddError, "Invalid DNAME owner name (wildcard): " <<
                           rrset->getName());
@@ -289,7 +289,7 @@ public:
             (rrset->getName().isWildcard() ||
              rrset->getName().getLabelCount() !=
              zone_name.getLabelCount() + 1)) {
-            LOG_ERROR(logger, DATASRC_BAD_NSEC3_NAME).
+            LOG_ERROR(logger, DATASRC_MEMORY_BAD_NSEC3_NAME).
                 arg(rrset->getName());
             isc_throw(AddError, "Invalid NSEC3 owner name: " <<
                       rrset->getName());
@@ -498,7 +498,7 @@ public:
         addValidation(zone_name, rrset);
 
         // OK, can add the RRset.
-        LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_ADD_RRSET).
+        LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_MEM_ADD_RRSET).
             arg(rrset->getName()).arg(rrset->getType()).arg(zone_name);
 
         if (rrset->getType() == RRType::NSEC3()) {
@@ -572,7 +572,7 @@ InMemoryClient::InMemoryClientImpl::load(
         // process only adds new nodes (and their data), so this assertion
         // should hold.
         if (RdataSet::find(set, RRType::NSEC3PARAM()) == NULL) {
-            LOG_WARN(logger, DATASRC_MEM_NO_NSEC3PARAM).
+            LOG_WARN(logger, DATASRC_MEMORY_MEM_NO_NSEC3PARAM).
                 arg(zone_name).arg(rrclass_);
         }
     }
@@ -585,7 +585,7 @@ InMemoryClient::InMemoryClientImpl::load(
                   "Won't create an empty zone for: " << zone_name);
     }
 
-    LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_ADD_ZONE).
+    LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEMORY_MEM_ADD_ZONE).
         arg(zone_name).arg(rrclass_.toText());
 
     // Set the filename in file_name_tree_ now, so that getFileName()
@@ -688,7 +688,7 @@ InMemoryClient::getZoneCount() const {
 
 isc::datasrc::memory::ZoneTable::FindResult
 InMemoryClient::findZone2(const isc::dns::Name& zone_name) const {
-    LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_FIND_ZONE).arg(zone_name);
+    LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_MEM_FIND_ZONE).arg(zone_name);
     ZoneTable::FindResult result(impl_->zone_table_->findZone(zone_name));
     return (result);
 }
@@ -705,7 +705,7 @@ InMemoryClient::findZone(const isc::dns::Name&) const {
 result::Result
 InMemoryClient::load(const isc::dns::Name& zone_name,
                      const std::string& filename) {
-    LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_LOAD).arg(zone_name).
+    LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEMORY_MEM_LOAD).arg(zone_name).
         arg(filename);
 
     return (impl_->load(zone_name, filename,

+ 15 - 15
src/lib/datasrc/memory/memory_messages.mes

@@ -16,62 +16,62 @@ $NAMESPACE isc::datasrc::memory
 
 # \brief Messages for the data source memory library
 
-% DATASRC_MEM_ADD_WILDCARD adding wildcards for '%1'
+% DATASRC_MEMORY_MEM_ADD_WILDCARD adding wildcards for '%1'
 This is a debug message issued during the processing of a wildcard
 name. The internal domain name tree is scanned and some nodes are
 specially marked to allow the wildcard lookup to succeed.
 
-% DATASRC_MEM_CNAME_TO_NONEMPTY can't add CNAME to domain with other data in '%1'
+% DATASRC_MEMORY_MEM_CNAME_TO_NONEMPTY can't add CNAME to domain with other data in '%1'
 Someone or something tried to add a CNAME into a domain that already contains
 some other data. But the protocol forbids coexistence of CNAME with anything
 (RFC 1034, section 3.6.2). This indicates a problem with provided data.
 
-% DATASRC_MEM_CNAME_COEXIST can't add data to CNAME in domain '%1'
+% DATASRC_MEMORY_MEM_CNAME_COEXIST can't add data to CNAME in domain '%1'
 This is the same problem as in MEM_CNAME_TO_NONEMPTY, but it happened the
 other way around -- adding some other data to CNAME.
 
-% DATASRC_MEM_DNAME_NS DNAME and NS can't coexist in non-apex domain '%1'
+% DATASRC_MEMORY_MEM_DNAME_NS DNAME and NS can't coexist in non-apex domain '%1'
 A request was made for DNAME and NS records to be put into the same
 domain which is not the apex (the top of the zone). This is forbidden
 by RFC 2672 (section 3) and indicates a problem with provided data.
 
-% DATASRC_MEM_SINGLETON trying to add multiple RRs for domain '%1' and type '%2'
+% DATASRC_MEMORY_MEM_SINGLETON trying to add multiple RRs for domain '%1' and type '%2'
 Some resource types are singletons -- only one is allowed in a domain
 (for example CNAME or SOA). This indicates a problem with provided data.
 
-% DATASRC_MEM_OUT_OF_ZONE domain '%1' doesn't belong to zone '%2'
+% DATASRC_MEMORY_MEM_OUT_OF_ZONE domain '%1' doesn't belong to zone '%2'
 It was attempted to add the domain into a zone that shouldn't have it
 (eg. the domain is not subdomain of the zone origin). This indicates a
 problem with provided data.
 
-% DATASRC_MEM_WILDCARD_NS NS record in wildcard domain '%1'
+% DATASRC_MEMORY_MEM_WILDCARD_NS NS record in wildcard domain '%1'
 The software refuses to load NS records into a wildcard domain.  It isn't
 explicitly forbidden, but the protocol is ambiguous about how this should
 behave and BIND 9 refuses that as well. Please describe your intention using
 different tools.
 
-% DATASRC_MEM_WILDCARD_DNAME DNAME record in wildcard domain '%1'
+% DATASRC_MEMORY_MEM_WILDCARD_DNAME DNAME record in wildcard domain '%1'
 The software refuses to load DNAME records into a wildcard domain.  It isn't
 explicitly forbidden, but the protocol is ambiguous about how this should
 behave and BIND 9 refuses that as well. Please describe your intention using
 different tools.
 
-% DATASRC_BAD_NSEC3_NAME NSEC3 record has a bad owner name '%1'
+% DATASRC_MEMORY_BAD_NSEC3_NAME NSEC3 record has a bad owner name '%1'
 The software refuses to load NSEC3 records into a wildcard domain or
 the owner name has two or more labels below the zone origin.
 It isn't explicitly forbidden, but no sane zone wouldn have such names
 for NSEC3.  BIND 9 also refuses NSEC3 at wildcard, so this behavior is
 compatible with BIND 9.
 
-% DATASRC_MEM_ADD_RRSET adding RRset '%1/%2' into zone '%3'
+% DATASRC_MEMORY_MEM_ADD_RRSET adding RRset '%1/%2' into zone '%3'
 Debug information. An RRset is being added to the in-memory data source.
 
-% DATASRC_MEM_DUP_RRSET duplicate RRset '%1/%2'
+% DATASRC_MEMORY_MEM_DUP_RRSET duplicate RRset '%1/%2'
 An RRset is being inserted into in-memory data source for a second time.  The
 original version must be removed first. Note that loading master files where an
 RRset is split into multiple locations is not supported yet.
 
-% DATASRC_MEM_NO_NSEC3PARAM NSEC3PARAM is missing for NSEC3-signed zone %1/%2
+% DATASRC_MEMORY_MEM_NO_NSEC3PARAM NSEC3PARAM is missing for NSEC3-signed zone %1/%2
 The in-memory data source has loaded a zone signed with NSEC3 RRs,
 but it doesn't have a NSEC3PARAM RR at the zone origin.  It's likely that
 the zone is somehow broken, but this RR is not necessarily needed for
@@ -79,12 +79,12 @@ handling lookups with NSEC3 in this data source, so it accepts the given
 content of the zone.  Nevertheless the administrator should look into
 the integrity of the zone data.
 
-% DATASRC_MEM_ADD_ZONE adding zone '%1/%2'
+% DATASRC_MEMORY_MEM_ADD_ZONE adding zone '%1/%2'
 Debug information. A zone is being added into the in-memory data source.
 
-% DATASRC_MEM_FIND_ZONE looking for zone '%1'
+% DATASRC_MEMORY_MEM_FIND_ZONE looking for zone '%1'
 Debug information. A zone object for this zone is being searched for in the
 in-memory data source.
 
-% DATASRC_MEM_LOAD loading zone '%1' from file '%2'
+% DATASRC_MEMORY_MEM_LOAD loading zone '%1' from file '%2'
 Debug information. The content of master file is being loaded into the memory.