BIND 10 trac744, updated. 96d1613a474602b833af953a364fb045fcfee776 [trac744] Logging for static data source
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon May 2 20:20:06 UTC 2011
The branch, trac744 has been updated
via 96d1613a474602b833af953a364fb045fcfee776 (commit)
from 6f8490fe9ce1d6dbef326d75f9eab79c09e83462 (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 96d1613a474602b833af953a364fb045fcfee776
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon May 2 22:19:52 2011 +0200
[trac744] Logging for static data source
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/messagedef.mes | 12 ++++++++++++
src/lib/datasrc/static_datasrc.cc | 7 +++++++
2 files changed, 19 insertions(+), 0 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/messagedef.mes b/src/lib/datasrc/messagedef.mes
index ff00c40..11f4140 100644
--- a/src/lib/datasrc/messagedef.mes
+++ b/src/lib/datasrc/messagedef.mes
@@ -406,3 +406,15 @@ MEM_ADD_ZONE Adding zone '%s/%s'
MEM_FIND_ZONE Looking for zone '%s'
+ Debug information. We're looking for a zone in the in-memory data source.
+
+STATIC_CREATE Creating the static datasource
++ Debug information. We're creating the static data source (the one holding
++ stuff like version.bind).
+
+STATIC_BAD_CLASS Static data source can handle CH only
++ For some reason, someone asked the static data source a query that is not in
++ the CH class.
+
+STATIC_FIND Looking for '%s/%s'
++ Debug information. We're looking for this resource record set in the static
++ data source.
diff --git a/src/lib/datasrc/static_datasrc.cc b/src/lib/datasrc/static_datasrc.cc
index 025078a..6d7f750 100644
--- a/src/lib/datasrc/static_datasrc.cc
+++ b/src/lib/datasrc/static_datasrc.cc
@@ -26,6 +26,7 @@
#include <datasrc/data_source.h>
#include <datasrc/static_datasrc.h>
+#include <datasrc/logger.h>
using namespace std;
using namespace isc::dns;
@@ -112,6 +113,7 @@ StaticDataSrcImpl::StaticDataSrcImpl() :
}
StaticDataSrc::StaticDataSrc() {
+ logger.debug(DBG_TRACE_BASIC, DATASRC_STATIC_CREATE);
setClass(RRClass::CH());
impl_ = new StaticDataSrcImpl;
}
@@ -155,8 +157,13 @@ StaticDataSrc::findRRset(const Name& qname,
RRsetList& target, uint32_t& flags,
const Name* const zonename) const
{
+ if (logger.isDebugEnabled(DBG_TRACE_DATA)) {
+ logger.debug(DBG_TRACE_DATA, DATASRC_STATIC_FIND,
+ qname.toText().c_str(), qtype.toText().c_str());
+ }
flags = 0;
if (qclass != getClass() && qclass != RRClass::ANY()) {
+ logger.error(DATASRC_STATIC_BAD_CLASS);
return (ERROR);
}
More information about the bind10-changes
mailing list