nlsr: Improve logging throughout lsdb.cpp and others
refs: #3934
Change-Id: I2365c88b795316c83dbeac2eab82f371c0275f88
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 58d5cf7..26276d7 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -312,12 +312,19 @@
certName = certName.getPrefix(-1);
}
else if (certName[-1].toUri() != "ID-CERT")
- return; //Wrong key interest.
+ {
+ _LOG_DEBUG("certName for interest " << interest << " is malformed,"
+ << " contains incorrect namespace syntax");
+ return;
+ }
std::shared_ptr<const ndn::IdentityCertificate> cert = getCertificate(certName);
if (!static_cast<bool>(cert))
- return; // cert is not found
+ {
+ _LOG_DEBUG("cert is not found for " << interest);
+ return; // cert is not found
+ }
std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>();
data->setName(interestName);