Commit 8d9debda authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac744] More arguments to the debug outputs

parent 6eba2b45
......@@ -454,7 +454,8 @@ struct MemoryZone::MemoryZoneImpl {
// the zone but is empty. Treat it as NXRRSET.
if (node_path.getLastComparisonResult().getRelation() ==
NameComparisonResult::SUPERDOMAIN) {
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_SUPER_STOP);
LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_SUPER_STOP).
arg(node_path.getAbsoluteName()).arg(name);
return (FindResult(NXRRSET, ConstRRsetPtr()));
}
......@@ -493,7 +494,7 @@ struct MemoryZone::MemoryZoneImpl {
NameComparisonResult::COMMONANCESTOR && node_path.
getLastComparisonResult().getCommonLabels() > 1) {
logger.debug(DBG_TRACE_DATA,
DATASRC_MEM_WILDCARD_CANCEL);
DATASRC_MEM_WILDCARD_CANCEL).arg(name);
return (FindResult(NXDOMAIN, ConstRRsetPtr()));
}
Name wildcard(Name("*").concatenate(
......@@ -516,7 +517,7 @@ struct MemoryZone::MemoryZoneImpl {
// fall through
case DomainTree::NOTFOUND:
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_NOTFOUND);
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_NOTFOUND).arg(name);
return (FindResult(NXDOMAIN, ConstRRsetPtr()));
case DomainTree::EXACTMATCH: // This one is OK, handle it
break;
......@@ -528,7 +529,7 @@ struct MemoryZone::MemoryZoneImpl {
// If there is an exact match but the node is empty, it's equivalent
// to NXRRSET.
if (node->isEmpty()) {
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_DOMAIN_EMPTY);
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_DOMAIN_EMPTY).arg(name);
return (FindResult(NXRRSET, ConstRRsetPtr()));
}
......@@ -539,7 +540,8 @@ struct MemoryZone::MemoryZoneImpl {
if (node->getFlag(DomainNode::FLAG_CALLBACK) && node != origin_data_) {
found = node->getData()->find(RRType::NS());
if (found != node->getData()->end()) {
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_EXACT_DELEGATION);
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_EXACT_DELEGATION).
arg(name);
return (FindResult(DELEGATION, prepareRRset(name,
found->second, rename)));
}
......@@ -555,27 +557,28 @@ struct MemoryZone::MemoryZoneImpl {
boost::const_pointer_cast<RRset>(prepareRRset(name,
found->second, rename)));
}
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_ANY_SUCCESS);
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_ANY_SUCCESS).arg(name);
return (FindResult(SUCCESS, ConstRRsetPtr()));
}
found = node->getData()->find(type);
if (found != node->getData()->end()) {
// Good, it is here
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_SUCCESS);
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_SUCCESS).arg(name).
arg(type);
return (FindResult(SUCCESS, prepareRRset(name, found->second,
rename)));
} else {
// Next, try CNAME.
found = node->getData()->find(RRType::CNAME());
if (found != node->getData()->end()) {
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_CNAME);
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_CNAME).arg(name);
return (FindResult(CNAME, prepareRRset(name, found->second,
rename)));
}
}
// No exact match or CNAME. Return NXRRSET.
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_NXRRSET);
logger.debug(DBG_TRACE_DATA, DATASRC_MEM_NXRRSET).arg(type).arg(name);
return (FindResult(NXRRSET, ConstRRsetPtr()));
}
};
......
......@@ -343,40 +343,40 @@ Debug information. A DNAME was found instead of the requested information.
% MEM_DELEG_FOUND delegation found at '%1'
Debug information. A delegation point was found above the requested record.
% MEM_SUPER_STOP stopped at superdomain, domain is empty
% MEM_SUPER_STOP stopped at superdomain '%1', domain '%2' is empty
Debug information. The search stopped at a superdomain of the requested
domain. The domain is a empty nonterminal, therefore it is treated as NXRRSET
case (eg. the domain exists, but it doesn't have the requested record type).
% MEM_WILDCARD_CANCEL wildcard match canceled
% MEM_WILDCARD_CANCEL wildcard match canceled for '%1'
Debug information. A domain above wildcard was reached, but there's something
below the requested domain. Therefore the wildcard doesn't apply here. This
behaviour is specified by RFC 1034, section 4.3.3
% MEM_NOTFOUND requested domain not found
% MEM_NOTFOUND requested domain '%1' not found
Debug information. The requested domain does not exist.
% MEM_DOMAIN_EMPTY requested domain is empty
% MEM_DOMAIN_EMPTY requested domain '%1' is empty
Debug information. The requested domain exists in the tree of domains, but
it is empty. Therefore it doesn't contain the requested resource type.
% MEM_EXACT_DELEGATION delegation at the exact domain
% MEM_EXACT_DELEGATION delegation at the exact domain '%1'
Debug information. There's a NS record at the requested domain. This means
this zone is not authoritative for the requested domain, but a delegation
should be followed. The requested domain is an apex of some zone.
% MEM_ANY_SUCCESS ANY query successful
% MEM_ANY_SUCCESS ANY query for '%1' successful
Debug information. The domain was found and an ANY type query is being answered
by providing everything found inside the domain.
% MEM_SUCCESS query successful
% MEM_SUCCESS query for '%1/%2' successful
Debug information. The requested record was found.
% MEM_CNAME cNAME at the domain
% MEM_CNAME CNAME at the domain '%1'
Debug information. The requested domain is an alias to a different domain,
returning the CNAME instead.
% MEM_NXRRSET no such type
% MEM_NXRRSET no such type '%1' at '%2'
Debug information. The domain exists, but it doesn't hold any record of the
requested type.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment