rename log macros to comply with ISO C++ standard

refs: #4341

Change-Id: Idb05f59660f42c01a7bf014c6fff4125a28327f2
diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index 5666ed0..33626f5 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -291,7 +291,7 @@
 void
 AdjacencyList::writeLog()
 {
-  _LOG_DEBUG("-------Adjacency List--------");
+  NLSR_LOG_DEBUG("-------Adjacency List--------");
   for (std::list<Adjacent>::iterator it = m_adjList.begin();
        it != m_adjList.end(); it++) {
     (*it).writeLog();
diff --git a/src/adjacent.cpp b/src/adjacent.cpp
index 7109f21..913bbbd 100644
--- a/src/adjacent.cpp
+++ b/src/adjacent.cpp
@@ -91,7 +91,7 @@
 void
 Adjacent::writeLog()
 {
-  _LOG_DEBUG(*this);
+  NLSR_LOG_DEBUG(*this);
 }
 
 } // namespace nlsr
diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index d87f4fc..ec8dca5 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -55,7 +55,7 @@
 SyncLogicHandler::createSyncSocket(const ndn::Name& syncPrefix)
 {
   if (m_syncSocket != nullptr) {
-    _LOG_WARN("Trying to create Sync socket, but Sync socket already exists");
+    NLSR_LOG_WARN("Trying to create Sync socket, but Sync socket already exists");
     return;
   }
 
@@ -64,7 +64,7 @@
   // Build LSA sync update prefix
   buildUpdatePrefix();
 
-  _LOG_DEBUG("Creating Sync socket. Sync Prefix: " << m_syncPrefix);
+  NLSR_LOG_DEBUG("Creating Sync socket. Sync Prefix: " << m_syncPrefix);
 
   // The face's lifetime is managed in main.cpp; SyncSocket should not manage the memory
   // of the object
@@ -84,18 +84,18 @@
 void
 SyncLogicHandler::onChronoSyncUpdate(const std::vector<chronosync::MissingDataInfo>& v)
 {
-  _LOG_DEBUG("Received ChronoSync update event");
+  NLSR_LOG_DEBUG("Received ChronoSync update event");
 
   for (size_t i = 0; i < v.size(); i++){
     ndn::Name updateName = v[i].session.getPrefix(-1);
 
-    _LOG_DEBUG("Update Name: " << updateName << " Seq no: " << v[i].high);
+    NLSR_LOG_DEBUG("Update Name: " << updateName << " Seq no: " << v[i].high);
 
     int32_t nlsrPosition = util::getNameComponentPosition(updateName, nlsr::NLSR_COMPONENT);
     int32_t lsaPosition = util::getNameComponentPosition(updateName, nlsr::LSA_COMPONENT);
 
     if (nlsrPosition < 0 || lsaPosition < 0) {
-      _LOG_WARN("Received malformed sync update");
+      NLSR_LOG_WARN("Received malformed sync update");
       return;
     }
 
@@ -113,7 +113,7 @@
 SyncLogicHandler::processUpdateFromSync(const ndn::Name& originRouter,
                                         const ndn::Name& updateName, const uint64_t& seqNo)
 {
-  _LOG_DEBUG("Origin Router of update: " << originRouter);
+  NLSR_LOG_DEBUG("Origin Router of update: " << originRouter);
 
   // A router should not try to fetch its own LSA
   if (originRouter != m_confParam.getRouterPrefix()) {
@@ -121,20 +121,20 @@
     Lsa::Type lsaType;
     std::istringstream(updateName.get(updateName.size()-1).toUri()) >> lsaType;
 
-    _LOG_DEBUG("Received sync update with higher " << lsaType
+    NLSR_LOG_DEBUG("Received sync update with higher " << lsaType
                << " sequence number than entry in LSDB");
 
     if (m_isLsaNew(originRouter, lsaType, seqNo)) {
       if (lsaType == Lsa::Type::ADJACENCY && seqNo != 0 &&
           m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_ON) {
-        _LOG_ERROR("Got an update for adjacency LSA when hyperbolic routing"
+        NLSR_LOG_ERROR("Got an update for adjacency LSA when hyperbolic routing"
                    << " is enabled. Not going to fetch.");
         return;
       }
 
       if (lsaType == Lsa::Type::COORDINATE && seqNo != 0 &&
           m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
-        _LOG_ERROR("Got an update for coordinate LSA when link-state"
+        NLSR_LOG_ERROR("Got an update for coordinate LSA when link-state"
                    << " is enabled. Not going to fetch.");
         return;
       }
@@ -147,7 +147,7 @@
 SyncLogicHandler::publishRoutingUpdate(const Lsa::Type& type, const uint64_t& seqNo)
 {
   if (m_syncSocket == nullptr) {
-    _LOG_FATAL("Cannot publish routing update; SyncSocket does not exist");
+    NLSR_LOG_FATAL("Cannot publish routing update; SyncSocket does not exist");
 
     BOOST_THROW_EXCEPTION(SyncLogicHandler::Error("Cannot publish routing update; SyncSocket does not exist"));
   }
@@ -188,7 +188,7 @@
 void
 SyncLogicHandler::publishSyncUpdate(const ndn::Name& updatePrefix, uint64_t seqNo)
 {
-  _LOG_DEBUG("Publishing Sync Update. Prefix: " << updatePrefix << " Seq No: " << seqNo);
+  NLSR_LOG_DEBUG("Publishing Sync Update. Prefix: " << updatePrefix << " Seq No: " << seqNo);
 
   ndn::Name updateName(updatePrefix);
   std::string data("NoData");
diff --git a/src/conf-parameter.cpp b/src/conf-parameter.cpp
index e19fe5e..05a96dd 100644
--- a/src/conf-parameter.cpp
+++ b/src/conf-parameter.cpp
@@ -31,33 +31,33 @@
 void
 ConfParameter::writeLog()
 {
-  _LOG_INFO("Router Name: " << m_routerName);
-  _LOG_INFO("Site Name: " << m_siteName);
-  _LOG_INFO("Network: " << m_network);
-  _LOG_INFO("Router Prefix: " << m_routerPrefix);
-  _LOG_INFO("ChronoSync sync Prefix: " << m_chronosyncPrefix);
-  _LOG_INFO("ChronoSync LSA prefix: " << m_lsaPrefix);
-  _LOG_INFO("Hello Interest retry number: " << m_interestRetryNumber);
-  _LOG_INFO("Hello Interest resend second: " << m_interestResendTime);
-  _LOG_INFO("Info Interest interval: " << m_infoInterestInterval);
-  _LOG_INFO("LSA refresh time: " << m_lsaRefreshTime);
-  _LOG_INFO("FIB Entry refresh time: " << m_lsaRefreshTime * 2);
-  _LOG_INFO("LSA Interest lifetime: " << getLsaInterestLifetime());
-  _LOG_INFO("Router dead interval: " << getRouterDeadInterval());
-  _LOG_INFO("Max Faces Per Prefix: " << m_maxFacesPerPrefix);
-  _LOG_INFO("Hyperbolic Routing: " << m_hyperbolicState);
-  _LOG_INFO("Hyp R: " << m_corR);
+  NLSR_LOG_INFO("Router Name: " << m_routerName);
+  NLSR_LOG_INFO("Site Name: " << m_siteName);
+  NLSR_LOG_INFO("Network: " << m_network);
+  NLSR_LOG_INFO("Router Prefix: " << m_routerPrefix);
+  NLSR_LOG_INFO("ChronoSync sync Prefix: " << m_chronosyncPrefix);
+  NLSR_LOG_INFO("ChronoSync LSA prefix: " << m_lsaPrefix);
+  NLSR_LOG_INFO("Hello Interest retry number: " << m_interestRetryNumber);
+  NLSR_LOG_INFO("Hello Interest resend second: " << m_interestResendTime);
+  NLSR_LOG_INFO("Info Interest interval: " << m_infoInterestInterval);
+  NLSR_LOG_INFO("LSA refresh time: " << m_lsaRefreshTime);
+  NLSR_LOG_INFO("FIB Entry refresh time: " << m_lsaRefreshTime * 2);
+  NLSR_LOG_INFO("LSA Interest lifetime: " << getLsaInterestLifetime());
+  NLSR_LOG_INFO("Router dead interval: " << getRouterDeadInterval());
+  NLSR_LOG_INFO("Max Faces Per Prefix: " << m_maxFacesPerPrefix);
+  NLSR_LOG_INFO("Hyperbolic Routing: " << m_hyperbolicState);
+  NLSR_LOG_INFO("Hyp R: " << m_corR);
   int i=0;
   for (auto const& value: m_corTheta) {
-    _LOG_INFO("Hyp Angle " << i++ << ": "<< value);
+    NLSR_LOG_INFO("Hyp Angle " << i++ << ": "<< value);
   }
-  _LOG_INFO("Log Directory: " << m_logDir);
-  _LOG_INFO("Seq Directory: " << m_seqFileDir);
+  NLSR_LOG_INFO("Log Directory: " << m_logDir);
+  NLSR_LOG_INFO("Seq Directory: " << m_seqFileDir);
 
   // Event Intervals
-  _LOG_INFO("Adjacency LSA build interval:  " << m_adjLsaBuildInterval);
-  _LOG_INFO("First Hello Interest interval: " << m_firstHelloInterval);
-  _LOG_INFO("Routing calculation interval:  " << m_routingCalcInterval);
+  NLSR_LOG_INFO("Adjacency LSA build interval:  " << m_adjLsaBuildInterval);
+  NLSR_LOG_INFO("First Hello Interest interval: " << m_firstHelloInterval);
+  NLSR_LOG_INFO("Routing calculation interval:  " << m_routingCalcInterval);
 }
 
 } // namespace nlsr
diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index 4a3d06b..b28620b 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -41,7 +41,7 @@
 void
 HelloProtocol::expressInterest(const ndn::Name& interestName, uint32_t seconds)
 {
-  _LOG_DEBUG("Expressing Interest :" << interestName);
+  NLSR_LOG_DEBUG("Expressing Interest :" << interestName);
   ndn::Interest i(interestName);
   i.setInterestLifetime(ndn::time::seconds(seconds));
   i.setMustBeFresh(true);
@@ -73,7 +73,7 @@
       interestName.append(m_nlsr.getConfParameter().getRouterPrefix().wireEncode());
       expressInterest(interestName,
                       m_nlsr.getConfParameter().getInterestResendTime());
-      _LOG_DEBUG("Sending scheduled interest: " << interestName);
+      NLSR_LOG_DEBUG("Sending scheduled interest: " << interestName);
     }
   }
   scheduleInterest(m_nlsr.getConfParameter().getInfoInterestInterval());
@@ -82,7 +82,7 @@
 void
 HelloProtocol::scheduleInterest(uint32_t seconds)
 {
-  _LOG_DEBUG("Scheduling HELLO Interests in " << ndn::time::seconds(seconds));
+  NLSR_LOG_DEBUG("Scheduling HELLO Interests in " << ndn::time::seconds(seconds));
 
   m_scheduler.scheduleEvent(ndn::time::seconds(seconds),
                             std::bind(&HelloProtocol::sendScheduledInterest, this, seconds));
@@ -98,16 +98,16 @@
   // increment RCV_HELLO_INTEREST
   hpIncrementSignal(Statistics::PacketType::RCV_HELLO_INTEREST);
 
-  _LOG_DEBUG("Interest Received for Name: " << interestName);
+  NLSR_LOG_DEBUG("Interest Received for Name: " << interestName);
   if (interestName.get(-2).toUri() != INFO_COMPONENT) {
-    _LOG_DEBUG("INFO_COMPONENT not found or interestName: " << interestName
+    NLSR_LOG_DEBUG("INFO_COMPONENT not found or interestName: " << interestName
                << " does not match expression");
     return;
   }
 
   ndn::Name neighbor;
   neighbor.wireDecode(interestName.get(-1).blockFromValue());
-  _LOG_DEBUG("Neighbor: " << neighbor);
+  NLSR_LOG_DEBUG("Neighbor: " << neighbor);
   if (m_nlsr.getAdjacencyList().isNeighbor(neighbor)) {
     std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>();
     data->setName(ndn::Name(interest.getName()).appendVersion());
@@ -115,7 +115,7 @@
     data->setContent(reinterpret_cast<const uint8_t*>(INFO_COMPONENT.c_str()),
                     INFO_COMPONENT.size());
     m_nlsr.getKeyChain().sign(*data, m_nlsr.getDefaultCertName());
-    _LOG_DEBUG("Sending out data for name: " << interest.getName());
+    NLSR_LOG_DEBUG("Sending out data for name: " << interest.getName());
     m_nlsr.getNlsrFace().put(*data);
     // increment SENT_HELLO_DATA
     hpIncrementSignal(Statistics::PacketType::SENT_HELLO_DATA);
@@ -142,27 +142,27 @@
 {
   // interest name: /<neighbor>/NLSR/INFO/<router>
   const ndn::Name interestName(interest.getName());
-  _LOG_DEBUG("Interest timed out for Name: " << interestName);
+  NLSR_LOG_DEBUG("Interest timed out for Name: " << interestName);
   if (interestName.get(-2).toUri() != INFO_COMPONENT) {
     return;
   }
   ndn::Name neighbor = interestName.getPrefix(-3);
-  _LOG_DEBUG("Neighbor: " << neighbor);
+  NLSR_LOG_DEBUG("Neighbor: " << neighbor);
   m_nlsr.getAdjacencyList().incrementTimedOutInterestCount(neighbor);
 
   Adjacent::Status status = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
 
   uint32_t infoIntTimedOutCount =
     m_nlsr.getAdjacencyList().getTimedOutInterestCount(neighbor);
-  _LOG_DEBUG("Status: " << status);
-  _LOG_DEBUG("Info Interest Timed out: " << infoIntTimedOutCount);
+  NLSR_LOG_DEBUG("Status: " << status);
+  NLSR_LOG_DEBUG("Info Interest Timed out: " << infoIntTimedOutCount);
   if (infoIntTimedOutCount < m_nlsr.getConfParameter().getInterestRetryNumber()) {
     // interest name: /<neighbor>/NLSR/INFO/<router>
     ndn::Name interestName(neighbor);
     interestName.append(NLSR_COMPONENT);
     interestName.append(INFO_COMPONENT);
     interestName.append(m_nlsr.getConfParameter().getRouterPrefix().wireEncode());
-    _LOG_DEBUG("Resending interest: " << interestName);
+    NLSR_LOG_DEBUG("Resending interest: " << interestName);
     expressInterest(interestName,
                     m_nlsr.getConfParameter().getInterestResendTime());
   }
@@ -170,7 +170,7 @@
            (infoIntTimedOutCount == m_nlsr.getConfParameter().getInterestRetryNumber())) {
     m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, Adjacent::STATUS_INACTIVE);
 
-    _LOG_DEBUG("Neighbor: " << neighbor << " status changed to INACTIVE");
+    NLSR_LOG_DEBUG("Neighbor: " << neighbor << " status changed to INACTIVE");
 
     m_nlsr.getLsdb().scheduleAdjLsaBuild();
   }
@@ -182,10 +182,10 @@
 void
 HelloProtocol::onContent(const ndn::Interest& interest, const ndn::Data& data)
 {
-  _LOG_DEBUG("Received data for INFO(name): " << data.getName());
+  NLSR_LOG_DEBUG("Received data for INFO(name): " << data.getName());
   if (data.getSignature().hasKeyLocator()) {
     if (data.getSignature().getKeyLocator().getType() == ndn::KeyLocator::KeyLocator_Name) {
-      _LOG_DEBUG("Data signed with: " << data.getSignature().getKeyLocator().getName());
+      NLSR_LOG_DEBUG("Data signed with: " << data.getSignature().getKeyLocator().getName());
     }
   }
   m_nlsr.getValidator().validate(data,
@@ -199,7 +199,7 @@
 {
   // data name: /<neighbor>/NLSR/INFO/<router>/<version>
   ndn::Name dataName = data->getName();
-  _LOG_DEBUG("Data validation successful for INFO(name): " << dataName);
+  NLSR_LOG_DEBUG("Data validation successful for INFO(name): " << dataName);
   if (dataName.get(-3).toUri() == INFO_COMPONENT) {
     ndn::Name neighbor = dataName.getPrefix(-4);
 
@@ -208,8 +208,8 @@
     m_nlsr.getAdjacencyList().setTimedOutInterestCount(neighbor, 0);
     Adjacent::Status newStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
 
-    _LOG_DEBUG("Neighbor : " << neighbor);
-    _LOG_DEBUG("Old Status: " << oldStatus << " New Status: " << newStatus);
+    NLSR_LOG_DEBUG("Neighbor : " << neighbor);
+    NLSR_LOG_DEBUG("Old Status: " << oldStatus << " New Status: " << newStatus);
     // change in Adjacency list
     if ((oldStatus - newStatus) != 0) {
       if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
@@ -228,7 +228,7 @@
 HelloProtocol::onContentValidationFailed(const std::shared_ptr<const ndn::Data>& data,
                                          const std::string& msg)
 {
-  _LOG_DEBUG("Validation Error: " << msg);
+  NLSR_LOG_DEBUG("Validation Error: " << msg);
 }
 
 } // namespace nlsr
diff --git a/src/logger.hpp b/src/logger.hpp
index d75687c..2236266 100644
--- a/src/logger.hpp
+++ b/src/logger.hpp
@@ -35,22 +35,22 @@
 #define INIT_LOGGER(name) \
   static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger(name)
 
-#define _LOG_TRACE(x) \
+#define NLSR_LOG_TRACE(x) \
   LOG4CXX_TRACE(staticModuleLogger, x)
 
-#define _LOG_DEBUG(x) \
+#define NLSR_LOG_DEBUG(x) \
   LOG4CXX_DEBUG(staticModuleLogger, x)
 
-#define _LOG_INFO(x) \
+#define NLSR_LOG_INFO(x) \
   LOG4CXX_INFO(staticModuleLogger, x)
 
-#define _LOG_WARN(x) \
+#define NLSR_LOG_WARN(x) \
   LOG4CXX_WARN(staticModuleLogger, x)
 
-#define _LOG_ERROR(x) \
+#define NLSR_LOG_ERROR(x) \
   LOG4CXX_ERROR(staticModuleLogger, x)
 
-#define _LOG_FATAL(x) \
+#define NLSR_LOG_FATAL(x) \
   LOG4CXX_FATAL(staticModuleLogger, x);
 
 void
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 16616c7..45cd33e 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -108,7 +108,7 @@
     }
   }
   catch (const std::exception& e) {
-    _LOG_ERROR("Could not deserialize from content: " << e.what());
+    NLSR_LOG_ERROR("Could not deserialize from content: " << e.what());
     return false;
   }
   return true;
@@ -123,19 +123,19 @@
 void
 NameLsa::writeLog()
 {
-  _LOG_DEBUG("Name Lsa: ");
-  _LOG_DEBUG("  Origination Router: " << m_origRouter);
-  _LOG_DEBUG("  Ls Type: " << getType());
-  _LOG_DEBUG("  Ls Seq No: " << m_lsSeqNo);
-  _LOG_DEBUG("  Ls Lifetime: " << m_expirationTimePoint);
-  _LOG_DEBUG("  Names: ");
+  NLSR_LOG_DEBUG("Name Lsa: ");
+  NLSR_LOG_DEBUG("  Origination Router: " << m_origRouter);
+  NLSR_LOG_DEBUG("  Ls Type: " << getType());
+  NLSR_LOG_DEBUG("  Ls Seq No: " << m_lsSeqNo);
+  NLSR_LOG_DEBUG("  Ls Lifetime: " << m_expirationTimePoint);
+  NLSR_LOG_DEBUG("  Names: ");
   int i = 1;
   std::list<ndn::Name> nl = m_npl.getNames();
   for (std::list<ndn::Name>::iterator it = nl.begin(); it != nl.end(); it++)
   {
-    _LOG_DEBUG("    Name " << i << ": " << (*it));
+    NLSR_LOG_DEBUG("    Name " << i << ": " << (*it));
   }
-  _LOG_DEBUG("name_lsa_end");
+  NLSR_LOG_DEBUG("name_lsa_end");
 }
 
 CoordinateLsa::CoordinateLsa(const ndn::Name& origR, uint32_t lsn,
@@ -196,7 +196,7 @@
     }
   }
   catch (const std::exception& e) {
-    _LOG_ERROR("Could not deserialize from content: " << e.what());
+    NLSR_LOG_ERROR("Could not deserialize from content: " << e.what());
     return false;
   }
   return true;
@@ -205,15 +205,15 @@
 void
 CoordinateLsa::writeLog()
 {
-  _LOG_DEBUG("Cor Lsa: ");
-  _LOG_DEBUG("  Origination Router: " << m_origRouter);
-  _LOG_DEBUG("  Ls Type: " << getType());
-  _LOG_DEBUG("  Ls Seq No: " << m_lsSeqNo);
-  _LOG_DEBUG("  Ls Lifetime: " << m_expirationTimePoint);
-  _LOG_DEBUG("    Hyperbolic Radius: " << m_corRad);
+  NLSR_LOG_DEBUG("Cor Lsa: ");
+  NLSR_LOG_DEBUG("  Origination Router: " << m_origRouter);
+  NLSR_LOG_DEBUG("  Ls Type: " << getType());
+  NLSR_LOG_DEBUG("  Ls Seq No: " << m_lsSeqNo);
+  NLSR_LOG_DEBUG("  Ls Lifetime: " << m_expirationTimePoint);
+  NLSR_LOG_DEBUG("    Hyperbolic Radius: " << m_corRad);
   int i = 0;
   for(auto const& value: m_angles) {
-    _LOG_DEBUG("    Hyperbolic Theta " << i++ << ": "<< value);
+    NLSR_LOG_DEBUG("    Hyperbolic Theta " << i++ << ": "<< value);
   }
 }
 
@@ -275,7 +275,7 @@
     }
   }
   catch (const std::exception& e) {
-    _LOG_ERROR("Could not deserialize from content: " << e.what());
+    NLSR_LOG_ERROR("Could not deserialize from content: " << e.what());
     return false;
   }
   return true;
@@ -304,7 +304,7 @@
 void
 AdjLsa::writeLog()
 {
-  _LOG_DEBUG(*this);
+  NLSR_LOG_DEBUG(*this);
 }
 
 std::ostream&
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 2d78610..9efc733 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -91,7 +91,7 @@
                       ndn::Name lsaName,
                       uint64_t seqNo)
 {
-  _LOG_DEBUG("Failed to fetch LSA: " << lsaName << ", Error code: " << errorCode
+  NLSR_LOG_DEBUG("Failed to fetch LSA: " << lsaName << ", Error code: " << errorCode
                                                 << ", Message: " << msg);
 
   if (ndn::time::steady_clock::now() < deadline) {
@@ -120,7 +120,7 @@
   std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>(ndn::Name(interestName));
   data->setContent(bufferPtr);
 
-  _LOG_DEBUG("Received data for LSA(name): " << data->getName());
+  NLSR_LOG_DEBUG("Received data for LSA(name): " << data->getName());
 
   ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
   uint64_t seqNo = interestName[-1].toNumber();
@@ -130,7 +130,7 @@
   }
   else if (seqNo > m_highestSeqNo[lsaName]) {
     m_highestSeqNo[lsaName] = seqNo;
-    _LOG_TRACE("SeqNo for LSA(name): " << data->getName() << "  updated");
+    NLSR_LOG_TRACE("SeqNo for LSA(name): " << data->getName() << "  updated");
   }
   else if (seqNo < m_highestSeqNo[lsaName]) {
     return;
@@ -216,8 +216,8 @@
   // Determines if the name LSA is new or not.
   if (chkNameLsa == 0) {
     addNameLsa(nlsa);
-    _LOG_DEBUG("New Name LSA");
-    _LOG_DEBUG("Adding Name Lsa");
+    NLSR_LOG_DEBUG("New Name LSA");
+    NLSR_LOG_DEBUG("Adding Name Lsa");
     nlsa.writeLog();
 
     if (nlsa.getOrigRouter() != m_nlsr.getConfParameter().getRouterPrefix()) {
@@ -245,8 +245,8 @@
   // Else this is a known name LSA, so we are updating it.
   else {
     if (chkNameLsa->getLsSeqNo() < nlsa.getLsSeqNo()) {
-      _LOG_DEBUG("Updated Name LSA. Updating LSDB");
-      _LOG_DEBUG("Deleting Name Lsa");
+      NLSR_LOG_DEBUG("Updated Name LSA. Updating LSDB");
+      NLSR_LOG_DEBUG("Deleting Name Lsa");
       chkNameLsa->writeLog();
       chkNameLsa->setLsSeqNo(nlsa.getLsSeqNo());
       chkNameLsa->setExpirationTimePoint(nlsa.getExpirationTimePoint());
@@ -277,7 +277,7 @@
                           std::inserter(namesToRemove, namesToRemove.begin()));
       for (std::list<ndn::Name>::iterator it = namesToRemove.begin();
            it != namesToRemove.end(); ++it) {
-        _LOG_DEBUG("Removing name LSA no longer advertised: " << (*it).toUri());
+        NLSR_LOG_DEBUG("Removing name LSA no longer advertised: " << (*it).toUri());
         chkNameLsa->removeName((*it));
         if (nlsa.getOrigRouter() != m_nlsr.getConfParameter().getRouterPrefix()) {
           if ((*it) != m_nlsr.getConfParameter().getRouterPrefix()) {
@@ -295,7 +295,7 @@
       chkNameLsa->setExpiringEventId(scheduleNameLsaExpiration(nlsa.getKey(),
                                                                nlsa.getLsSeqNo(),
                                                                timeToExpire));
-      _LOG_DEBUG("Adding Name Lsa");
+      NLSR_LOG_DEBUG("Adding Name Lsa");
       chkNameLsa->writeLog();
     }
   }
@@ -323,7 +323,7 @@
                                                  m_nameLsdb.end(),
                                                  std::bind(nameLsaCompareByKey, _1, key));
   if (it != m_nameLsdb.end()) {
-    _LOG_DEBUG("Deleting Name Lsa");
+    NLSR_LOG_DEBUG("Deleting Name Lsa");
     (*it).writeLog();
     // If the requested name LSA is not ours, we also need to remove
     // its entries from the NPT.
@@ -358,7 +358,7 @@
 void
 Lsdb::writeNameLsdbLog()
 {
-  _LOG_DEBUG("---------------Name LSDB-------------------");
+  NLSR_LOG_DEBUG("---------------Name LSDB-------------------");
   for (std::list<NameLsa>::iterator it = m_nameLsdb.begin();
        it != m_nameLsdb.end() ; it++) {
     (*it).writeLog();
@@ -453,8 +453,8 @@
   CoordinateLsa* chkCorLsa = findCoordinateLsa(clsa.getKey());
   // Checking whether the LSA is new or not.
   if (chkCorLsa == 0) {
-    _LOG_DEBUG("New Coordinate LSA. Adding to LSDB");
-    _LOG_DEBUG("Adding Coordinate Lsa");
+    NLSR_LOG_DEBUG("New Coordinate LSA. Adding to LSDB");
+    NLSR_LOG_DEBUG("Adding Coordinate Lsa");
     clsa.writeLog();
     addCoordinateLsa(clsa);
 
@@ -478,8 +478,8 @@
   // We are just updating this LSA.
   else {
     if (chkCorLsa->getLsSeqNo() < clsa.getLsSeqNo()) {
-      _LOG_DEBUG("Updated Coordinate LSA. Updating LSDB");
-      _LOG_DEBUG("Deleting Coordinate Lsa");
+      NLSR_LOG_DEBUG("Updated Coordinate LSA. Updating LSDB");
+      NLSR_LOG_DEBUG("Deleting Coordinate Lsa");
       chkCorLsa->writeLog();
       chkCorLsa->setLsSeqNo(clsa.getLsSeqNo());
       chkCorLsa->setExpirationTimePoint(clsa.getExpirationTimePoint());
@@ -501,7 +501,7 @@
       chkCorLsa->setExpiringEventId(scheduleCoordinateLsaExpiration(clsa.getKey(),
                                                                     clsa.getLsSeqNo(),
                                                                     timeToExpire));
-      _LOG_DEBUG("Adding Coordinate Lsa");
+      NLSR_LOG_DEBUG("Adding Coordinate Lsa");
       chkCorLsa->writeLog();
     }
   }
@@ -530,7 +530,7 @@
                                                        std::bind(corLsaCompareByKey,
                                                                  _1, key));
   if (it != m_corLsdb.end()) {
-    _LOG_DEBUG("Deleting Coordinate Lsa");
+    NLSR_LOG_DEBUG("Deleting Coordinate Lsa");
     it->writeLog();
 
     if (it->getOrigRouter() != m_nlsr.getConfParameter().getRouterPrefix()) {
@@ -559,7 +559,7 @@
 void
 Lsdb::writeCorLsdbLog()
 {
-  _LOG_DEBUG("---------------Cor LSDB-------------------");
+  NLSR_LOG_DEBUG("---------------Cor LSDB-------------------");
   for (std::list<CoordinateLsa>::iterator it = m_corLsdb.begin();
        it != m_corLsdb.end() ; it++) {
     (*it).writeLog();
@@ -591,12 +591,12 @@
 
   if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
     // Don't build adjacency LSAs in hyperbolic routing
-    _LOG_DEBUG("Adjacency LSA not built. Currently in hyperbolic routing state.");
+    NLSR_LOG_DEBUG("Adjacency LSA not built. Currently in hyperbolic routing state.");
     return;
   }
 
   if (m_nlsr.getIsBuildAdjLsaSheduled() == false) {
-    _LOG_DEBUG("Scheduling Adjacency LSA build in " << m_adjLsaBuildInterval);
+    NLSR_LOG_DEBUG("Scheduling Adjacency LSA build in " << m_adjLsaBuildInterval);
 
     m_scheduler.scheduleEvent(m_adjLsaBuildInterval, std::bind(&Lsdb::buildAdjLsa, this));
     m_nlsr.setIsBuildAdjLsaSheduled(true);
@@ -606,7 +606,7 @@
 void
 Lsdb::buildAdjLsa()
 {
-  _LOG_TRACE("Lsdb::buildAdjLsa called");
+  NLSR_LOG_TRACE("Lsdb::buildAdjLsa called");
 
   m_nlsr.setIsBuildAdjLsaSheduled(false);
 
@@ -617,7 +617,7 @@
     if (adjBuildCount > 0) {
       // It only makes sense to do the adjLsa build if we have neighbors
       if (m_nlsr.getAdjacencyList().getNumOfActiveNeighbor() > 0) {
-        _LOG_DEBUG("Building and installing own Adj LSA");
+        NLSR_LOG_DEBUG("Building and installing own Adj LSA");
         buildAndInstallOwnAdjLsa();
       }
       // We have no active neighbors, meaning no one can route through
@@ -625,7 +625,7 @@
       // router from refreshing the LSA, eventually causing other
       // routers to delete it, too.
       else {
-        _LOG_DEBUG("Removing own Adj LSA; no ACTIVE neighbors");
+        NLSR_LOG_DEBUG("Removing own Adj LSA; no ACTIVE neighbors");
         // Get this router's key
         ndn::Name key = m_nlsr.getConfParameter().getRouterPrefix();
         key.append(std::to_string(Lsa::Type::ADJACENCY));
@@ -710,8 +710,8 @@
   AdjLsa* chkAdjLsa = findAdjLsa(alsa.getKey());
   // If this adj. LSA is not in the LSDB already
   if (chkAdjLsa == 0) {
-    _LOG_DEBUG("New Adj LSA. Adding to LSDB");
-    _LOG_DEBUG("Adding Adj Lsa");
+    NLSR_LOG_DEBUG("New Adj LSA. Adding to LSDB");
+    NLSR_LOG_DEBUG("Adding Adj Lsa");
     alsa.writeLog();
     addAdjLsa(alsa);
     // Add any new name prefixes to the NPT
@@ -727,8 +727,8 @@
   }
   else {
     if (chkAdjLsa->getLsSeqNo() < alsa.getLsSeqNo()) {
-      _LOG_DEBUG("Updated Adj LSA. Updating LSDB");
-      _LOG_DEBUG("Deleting Adj Lsa");
+      NLSR_LOG_DEBUG("Updated Adj LSA. Updating LSDB");
+      NLSR_LOG_DEBUG("Deleting Adj Lsa");
       chkAdjLsa->writeLog();
       chkAdjLsa->setLsSeqNo(alsa.getLsSeqNo());
       chkAdjLsa->setExpirationTimePoint(alsa.getExpirationTimePoint());
@@ -750,7 +750,7 @@
       chkAdjLsa->setExpiringEventId(scheduleAdjLsaExpiration(alsa.getKey(),
                                                              alsa.getLsSeqNo(),
                                                              timeToExpire));
-      _LOG_DEBUG("Adding Adj Lsa");
+      NLSR_LOG_DEBUG("Adding Adj Lsa");
       chkAdjLsa->writeLog();
     }
   }
@@ -783,7 +783,7 @@
                                                 m_adjLsdb.end(),
                                                 std::bind(adjLsaCompareByKey, _1, key));
   if (it != m_adjLsdb.end()) {
-    _LOG_DEBUG("Deleting Adj Lsa");
+    NLSR_LOG_DEBUG("Deleting Adj Lsa");
     (*it).writeLog();
     (*it).removeNptEntries(m_nlsr);
     m_adjLsdb.erase(it);
@@ -832,22 +832,22 @@
 void
 Lsdb::expireOrRefreshNameLsa(const ndn::Name& lsaKey, uint64_t seqNo)
 {
-  _LOG_DEBUG("Lsdb::expireOrRefreshNameLsa Called");
-  _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
+  NLSR_LOG_DEBUG("Lsdb::expireOrRefreshNameLsa Called");
+  NLSR_LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
   NameLsa* chkNameLsa = findNameLsa(lsaKey);
   // If this name LSA exists in the LSDB
   if (chkNameLsa != 0) {
-    _LOG_DEBUG("LSA Exists with seq no: " << chkNameLsa->getLsSeqNo());
+    NLSR_LOG_DEBUG("LSA Exists with seq no: " << chkNameLsa->getLsSeqNo());
     // If its seq no is the one we are expecting.
     if (chkNameLsa->getLsSeqNo() == seqNo) {
       if (chkNameLsa->getOrigRouter() == m_thisRouterPrefix) {
-        _LOG_DEBUG("Own Name LSA, so refreshing it");
-        _LOG_DEBUG("Deleting Name Lsa");
+        NLSR_LOG_DEBUG("Own Name LSA, so refreshing it");
+        NLSR_LOG_DEBUG("Deleting Name Lsa");
         chkNameLsa->writeLog();
         chkNameLsa->setLsSeqNo(chkNameLsa->getLsSeqNo() + 1);
         m_sequencingManager.setNameLsaSeq(chkNameLsa->getLsSeqNo());
         chkNameLsa->setExpirationTimePoint(getLsaExpirationTimePoint());
-        _LOG_DEBUG("Adding Name Lsa");
+        NLSR_LOG_DEBUG("Adding Name Lsa");
         chkNameLsa->writeLog();
         // schedule refreshing event again
         chkNameLsa->setExpiringEventId(scheduleNameLsaExpiration(chkNameLsa->getKey(),
@@ -858,7 +858,7 @@
       }
       // Since we cannot refresh other router's LSAs, our only choice is to expire.
       else {
-        _LOG_DEBUG("Other's Name LSA, so removing from LSDB");
+        NLSR_LOG_DEBUG("Other's Name LSA, so removing from LSDB");
         removeNameLsa(lsaKey);
       }
     }
@@ -875,23 +875,23 @@
 void
 Lsdb::expireOrRefreshAdjLsa(const ndn::Name& lsaKey, uint64_t seqNo)
 {
-  _LOG_DEBUG("Lsdb::expireOrRefreshAdjLsa Called");
-  _LOG_DEBUG("LSA Key: " << lsaKey << " Seq No: " << seqNo);
+  NLSR_LOG_DEBUG("Lsdb::expireOrRefreshAdjLsa Called");
+  NLSR_LOG_DEBUG("LSA Key: " << lsaKey << " Seq No: " << seqNo);
   AdjLsa* chkAdjLsa = findAdjLsa(lsaKey);
   // If this is a valid LSA
   if (chkAdjLsa != 0) {
-    _LOG_DEBUG("LSA Exists with seq no: " << chkAdjLsa->getLsSeqNo());
+    NLSR_LOG_DEBUG("LSA Exists with seq no: " << chkAdjLsa->getLsSeqNo());
     // And if it hasn't been updated for some other reason
     if (chkAdjLsa->getLsSeqNo() == seqNo) {
       // If it is our own LSA
       if (chkAdjLsa->getOrigRouter() == m_thisRouterPrefix) {
-        _LOG_DEBUG("Own Adj LSA, so refreshing it");
-        _LOG_DEBUG("Deleting Adj Lsa");
+        NLSR_LOG_DEBUG("Own Adj LSA, so refreshing it");
+        NLSR_LOG_DEBUG("Deleting Adj Lsa");
         chkAdjLsa->writeLog();
         chkAdjLsa->setLsSeqNo(chkAdjLsa->getLsSeqNo() + 1);
         m_sequencingManager.setAdjLsaSeq(chkAdjLsa->getLsSeqNo());
         chkAdjLsa->setExpirationTimePoint(getLsaExpirationTimePoint());
-        _LOG_DEBUG("Adding Adj Lsa");
+        NLSR_LOG_DEBUG("Adding Adj Lsa");
         chkAdjLsa->writeLog();
         // schedule refreshing event again
         chkAdjLsa->setExpiringEventId(scheduleAdjLsaExpiration(chkAdjLsa->getKey(),
@@ -902,7 +902,7 @@
       }
       // An LSA from another router is expiring
       else {
-        _LOG_DEBUG("Other's Adj LSA, so removing from LSDB");
+        NLSR_LOG_DEBUG("Other's Adj LSA, so removing from LSDB");
         removeAdjLsa(lsaKey);
       }
       // We have changed the contents of the LSDB, so we have to
@@ -923,17 +923,17 @@
 Lsdb::expireOrRefreshCoordinateLsa(const ndn::Name& lsaKey,
                                     uint64_t seqNo)
 {
-  _LOG_DEBUG("Lsdb::expireOrRefreshCorLsa Called ");
-  _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
+  NLSR_LOG_DEBUG("Lsdb::expireOrRefreshCorLsa Called ");
+  NLSR_LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
   CoordinateLsa* chkCorLsa = findCoordinateLsa(lsaKey);
   // Whether the LSA is in the LSDB or not.
   if (chkCorLsa != 0) {
-    _LOG_DEBUG("LSA Exists with seq no: " << chkCorLsa->getLsSeqNo());
+    NLSR_LOG_DEBUG("LSA Exists with seq no: " << chkCorLsa->getLsSeqNo());
     // Whether the LSA has been updated without our knowledge.
     if (chkCorLsa->getLsSeqNo() == seqNo) {
       if (chkCorLsa->getOrigRouter() == m_thisRouterPrefix) {
-        _LOG_DEBUG("Own Cor LSA, so refreshing it");
-        _LOG_DEBUG("Deleting Coordinate Lsa");
+        NLSR_LOG_DEBUG("Own Cor LSA, so refreshing it");
+        NLSR_LOG_DEBUG("Deleting Coordinate Lsa");
         chkCorLsa->writeLog();
         chkCorLsa->setLsSeqNo(chkCorLsa->getLsSeqNo() + 1);
         if (m_nlsr.getConfParameter().getHyperbolicState() != HYPERBOLIC_STATE_OFF) {
@@ -941,7 +941,7 @@
         }
 
         chkCorLsa->setExpirationTimePoint(getLsaExpirationTimePoint());
-        _LOG_DEBUG("Adding Coordinate Lsa");
+        NLSR_LOG_DEBUG("Adding Coordinate Lsa");
         chkCorLsa->writeLog();
         // schedule refreshing event again
         chkCorLsa->setExpiringEventId(scheduleCoordinateLsaExpiration(
@@ -956,7 +956,7 @@
       }
       // We can't refresh other router's LSAs, so we remove it.
       else {
-        _LOG_DEBUG("Other's Cor LSA, so removing from LSDB");
+        NLSR_LOG_DEBUG("Other's Cor LSA, so removing from LSDB");
         removeCoordinateLsa(lsaKey);
       }
       if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
@@ -997,7 +997,7 @@
   ndn::Interest interest(interestName);
   interest.setInterestLifetime(m_nlsr.getConfParameter().getLsaInterestLifetime());
 
-  _LOG_DEBUG("Fetching Data for LSA: " << interestName << " Seq number: " << seqNo);
+  NLSR_LOG_DEBUG("Fetching Data for LSA: " << interestName << " Seq number: " << seqNo);
   ndn::util::SegmentFetcher::fetch(m_nlsr.getNlsrFace(), interest,
                                    m_nlsr.getValidator(),
                                    std::bind(&Lsdb::afterFetchLsa, this, _1, interestName),
@@ -1017,7 +1017,7 @@
     lsaIncrementSignal(Statistics::PacketType::SENT_NAME_LSA_INTEREST);
     break;
   default:
-    _LOG_ERROR("lsaType " << lsaType << " not recognized; failed Statistics::PacketType conversion");
+    NLSR_LOG_ERROR("lsaType " << lsaType << " not recognized; failed Statistics::PacketType conversion");
   }
 }
 
@@ -1028,7 +1028,7 @@
   lsaIncrementSignal(Statistics::PacketType::RCV_LSA_INTEREST);
 
   const ndn::Name& interestName(interest.getName());
-  _LOG_DEBUG("Interest received for LSA: " << interestName);
+  NLSR_LOG_DEBUG("Interest received for LSA: " << interestName);
 
   std::string chkString("LSA");
   int32_t lsaPosition = util::getNameComponentPosition(interest.getName(), chkString);
@@ -1041,7 +1041,7 @@
                                                 interest.getName().size() - lsaPosition - 3));
 
     uint64_t seqNo = interestName[-1].toNumber();
-    _LOG_DEBUG("LSA sequence number from interest: " << seqNo);
+    NLSR_LOG_DEBUG("LSA sequence number from interest: " << seqNo);
 
     Lsa::Type interestedLsType;
     std::istringstream(interestName[-2].toUri()) >> interestedLsType;
@@ -1059,7 +1059,7 @@
                                       seqNo);
     }
     else {
-      _LOG_WARN("Received unrecognized LSA type: " << interestedLsType);
+      NLSR_LOG_WARN("Received unrecognized LSA type: " << interestedLsType);
     }
     lsaIncrementSignal(Statistics::PacketType::SENT_LSA_DATA);
   }
@@ -1075,7 +1075,7 @@
                                 m_nlsr.getKeyChain(),
                                 m_lsaRefreshTime,
                                 content);
-  _LOG_DEBUG("Sending requested data ( " << content << ")  for interest (" << interest
+  NLSR_LOG_DEBUG("Sending requested data ( " << content << ")  for interest (" << interest
              << ") to be published and added to face.");
   publisher.publish(interest.getName(),
                     ndn::security::signingByCertificate(m_nlsr.getDefaultCertName()));
@@ -1093,7 +1093,7 @@
 {
   // increment RCV_NAME_LSA_INTEREST
   lsaIncrementSignal(Statistics::PacketType::RCV_NAME_LSA_INTEREST);
-  _LOG_DEBUG("nameLsa interest " << interest << " received");
+  NLSR_LOG_DEBUG("nameLsa interest " << interest << " received");
   NameLsa*  nameLsa = m_nlsr.getLsdb().findNameLsa(lsaKey);
   if (nameLsa != 0) {
     if (nameLsa->getLsSeqNo() == seqNo) {
@@ -1103,11 +1103,11 @@
       lsaIncrementSignal(Statistics::PacketType::SENT_NAME_LSA_DATA);
     }
     else {
-      _LOG_TRACE("SeqNo for nameLsa does not match");
+      NLSR_LOG_TRACE("SeqNo for nameLsa does not match");
     }
   }
   else {
-    _LOG_TRACE(interest << "  was not found in this lsdb");
+    NLSR_LOG_TRACE(interest << "  was not found in this lsdb");
   }
 }
 
@@ -1122,12 +1122,12 @@
                                      uint64_t seqNo)
 {
   if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
-    _LOG_ERROR("Received interest for an adjacency LSA when hyperbolic routing is enabled");
+    NLSR_LOG_ERROR("Received interest for an adjacency LSA when hyperbolic routing is enabled");
   }
 
   // increment RCV_ADJ_LSA_INTEREST
   lsaIncrementSignal(Statistics::PacketType::RCV_ADJ_LSA_INTEREST);
-  _LOG_DEBUG("AdjLsa interest " << interest << " received");
+  NLSR_LOG_DEBUG("AdjLsa interest " << interest << " received");
   AdjLsa* adjLsa = m_nlsr.getLsdb().findAdjLsa(lsaKey);
   if (adjLsa != 0) {
     if (adjLsa->getLsSeqNo() == seqNo) {
@@ -1137,11 +1137,11 @@
       lsaIncrementSignal(Statistics::PacketType::SENT_ADJ_LSA_DATA);
     }
     else {
-      _LOG_TRACE("SeqNo for AdjLsa does not match");
+      NLSR_LOG_TRACE("SeqNo for AdjLsa does not match");
     }
   }
   else {
-    _LOG_TRACE(interest << "  was not found in this lsdb");
+    NLSR_LOG_TRACE(interest << "  was not found in this lsdb");
   }
 }
 
@@ -1156,12 +1156,12 @@
                                       uint64_t seqNo)
 {
   if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
-    _LOG_ERROR("Received Interest for a coordinate LSA when link-state routing is enabled");
+    NLSR_LOG_ERROR("Received Interest for a coordinate LSA when link-state routing is enabled");
   }
 
   // increment RCV_COORD_LSA_INTEREST
   lsaIncrementSignal(Statistics::PacketType::RCV_COORD_LSA_INTEREST);
-  _LOG_DEBUG("CoordinateLsa interest " << interest << " received");
+  NLSR_LOG_DEBUG("CoordinateLsa interest " << interest << " received");
   CoordinateLsa* corLsa = m_nlsr.getLsdb().findCoordinateLsa(lsaKey);
   if (corLsa != 0) {
     if (corLsa->getLsSeqNo() == seqNo) {
@@ -1171,11 +1171,11 @@
       lsaIncrementSignal(Statistics::PacketType::SENT_COORD_LSA_DATA);
     }
     else {
-      _LOG_TRACE("SeqNo for CoordinateLsa does not match");
+      NLSR_LOG_TRACE("SeqNo for CoordinateLsa does not match");
     }
   }
   else {
-    _LOG_TRACE(interest << "  was not found in this lsdb");
+    NLSR_LOG_TRACE(interest << "  was not found in this lsdb");
   }
 }
 
@@ -1183,7 +1183,7 @@
 Lsdb::onContentValidated(const std::shared_ptr<const ndn::Data>& data)
 {
   const ndn::Name& dataName = data->getName();
-  _LOG_DEBUG("Data validation successful for LSA: " << dataName);
+  NLSR_LOG_DEBUG("Data validation successful for LSA: " << dataName);
 
   std::string chkString("LSA");
   int32_t lsaPosition = util::getNameComponentPosition(dataName, chkString);
@@ -1214,7 +1214,7 @@
                                   dataContent);
     }
     else {
-      _LOG_WARN("Received unrecognized LSA Type: " << interestedLsType);
+      NLSR_LOG_WARN("Received unrecognized LSA Type: " << interestedLsType);
     }
 
     // increment RCV_LSA_DATA
@@ -1234,7 +1234,7 @@
       installNameLsa(nameLsa);
     }
     else {
-      _LOG_DEBUG("LSA data decoding error :(");
+      NLSR_LOG_DEBUG("LSA data decoding error :(");
     }
   }
 }
@@ -1251,7 +1251,7 @@
       installAdjLsa(adjLsa);
     }
     else {
-      _LOG_DEBUG("LSA data decoding error :(");
+      NLSR_LOG_DEBUG("LSA data decoding error :(");
     }
   }
 }
@@ -1268,7 +1268,7 @@
       installCoordinateLsa(corLsa);
     }
     else {
-      _LOG_DEBUG("LSA data decoding error :(");
+      NLSR_LOG_DEBUG("LSA data decoding error :(");
     }
   }
 }
@@ -1285,7 +1285,7 @@
 void
 Lsdb::writeAdjLsdbLog()
 {
-  _LOG_DEBUG("---------------Adj LSDB-------------------");
+  NLSR_LOG_DEBUG("---------------Adj LSDB-------------------");
   for (std::list<AdjLsa>::iterator it = m_adjLsdb.begin();
        it != m_adjLsdb.end() ; it++) {
     (*it).writeLog();
diff --git a/src/nlsr-runner.cpp b/src/nlsr-runner.cpp
index 84ec812..652139f 100644
--- a/src/nlsr-runner.cpp
+++ b/src/nlsr-runner.cpp
@@ -74,7 +74,7 @@
     m_nlsr.startEventLoop();
   }
   catch (const std::exception& e) {
-    _LOG_FATAL("ERROR: " << e.what());
+    NLSR_LOG_FATAL("ERROR: " << e.what());
     std::cerr << "ERROR: " << e.what() << std::endl;
 
     m_nlsr.getFib().clean();
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index a54f737..da9de61 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -89,14 +89,14 @@
 void
 Nlsr::registrationFailed(const ndn::Name& name)
 {
-  _LOG_ERROR("ERROR: Failed to register prefix in local hub's daemon");
+  NLSR_LOG_ERROR("ERROR: Failed to register prefix in local hub's daemon");
   BOOST_THROW_EXCEPTION(Error("Error: Prefix registration failed"));
 }
 
 void
 Nlsr::onRegistrationSuccess(const ndn::Name& name)
 {
-  _LOG_DEBUG("Successfully registered prefix: " << name);
+  NLSR_LOG_DEBUG("Successfully registered prefix: " << name);
 
   if (name.equals(m_confParam.getRouterPrefix())) {
     // the top-level prefixes are added.
@@ -104,7 +104,7 @@
       m_routerNameDispatcher.addTopPrefix(m_confParam.getRouterPrefix(), false, m_signingInfo);
     }
     catch (const std::exception& e) {
-      _LOG_ERROR("Error setting top-level prefix in dispatcher: " << e.what() << "\n");
+      NLSR_LOG_ERROR("Error setting top-level prefix in dispatcher: " << e.what() << "\n");
     }
   }
 }
@@ -118,7 +118,7 @@
     m_localhostDispatcher.addTopPrefix(LOCALHOST_PREFIX, false, m_signingInfo);
   }
   catch (const std::exception& e) {
-    _LOG_ERROR("Error setting top-level prefix in dispatcher: " << e.what() << "\n");
+    NLSR_LOG_ERROR("Error setting top-level prefix in dispatcher: " << e.what() << "\n");
   }
 }
 
@@ -126,7 +126,7 @@
 Nlsr::setInfoInterestFilter()
 {
   ndn::Name name(m_confParam.getRouterPrefix());
-  _LOG_DEBUG("Setting interest filter for name: " << name);
+  NLSR_LOG_DEBUG("Setting interest filter for name: " << name);
   getNlsrFace().setInterestFilter(name,
                                   std::bind(&HelloProtocol::processInterest,
                                             &m_helloProtocol, _1, _2),
@@ -142,7 +142,7 @@
   ndn::Name name = m_confParam.getLsaPrefix();
   name.append(m_confParam.getSiteName());
   name.append(m_confParam.getRouterName());
-  _LOG_DEBUG("Setting interest filter for LsaPrefix: " << name);
+  NLSR_LOG_DEBUG("Setting interest filter for LsaPrefix: " << name);
   getNlsrFace().setInterestFilter(name,
                                   std::bind(&Lsdb::processInterest,
                                             &m_nlsrLsdb, _1, _2),
@@ -176,7 +176,7 @@
     BOOST_THROW_EXCEPTION(Error("Error: Daemonization process- fork failed!"));
   }
   if (process_id > 0) {
-    _LOG_DEBUG("Process daemonized. Process id: " << process_id);
+    NLSR_LOG_DEBUG("Process daemonized. Process id: " << process_id);
     exit(0);
   }
 
@@ -209,13 +209,13 @@
   if (currentNeighbor != m_adjacencyList.getAdjList().end()) {
     ndn::util::FaceUri uri(currentNeighbor->getFaceUri());
     uri.canonize([this, then, currentNeighbor] (ndn::util::FaceUri canonicalUri) {
-        _LOG_DEBUG("Canonized URI: " << currentNeighbor->getFaceUri()
+        NLSR_LOG_DEBUG("Canonized URI: " << currentNeighbor->getFaceUri()
                    << " to: " << canonicalUri);
         currentNeighbor->setFaceUri(canonicalUri);
         then(std::next(currentNeighbor));
       },
       [this, then, currentNeighbor] (const std::string& reason) {
-        _LOG_ERROR("Could not canonize URI: " << currentNeighbor->getFaceUri()
+        NLSR_LOG_ERROR("Could not canonize URI: " << currentNeighbor->getFaceUri()
                    << " because: " << reason);
         then(std::next(currentNeighbor));
       },
@@ -231,7 +231,7 @@
 void
 Nlsr::initialize()
 {
-  _LOG_DEBUG("Initializing Nlsr");
+  NLSR_LOG_DEBUG("Initializing Nlsr");
   m_confParam.buildRouterPrefix();
   m_lsdbDatasetHandler.setRouterNameCommandPrefix(m_confParam.getRouterPrefix());
   m_nlsrLsdb.setLsaRefreshTime(ndn::time::seconds(m_confParam.getLsaRefreshTime()));
@@ -246,11 +246,11 @@
   // Logging start
   m_confParam.writeLog();
   m_adjacencyList.writeLog();
-  _LOG_DEBUG(m_namePrefixList);
+  NLSR_LOG_DEBUG(m_namePrefixList);
   // Logging end
   initializeKey();
   setStrategies();
-  _LOG_DEBUG("Default NLSR identity: " << m_signingInfo.getSignerName());
+  NLSR_LOG_DEBUG("Default NLSR identity: " << m_signingInfo.getSignerName());
   setInfoInterestFilter();
   setLsaInterestFilter();
 
@@ -355,7 +355,7 @@
     }
   else if (certName[-1].toUri() != "ID-CERT")
     {
-      _LOG_DEBUG("certName for interest " << interest << " is malformed,"
+      NLSR_LOG_DEBUG("certName for interest " << interest << " is malformed,"
                  << " contains incorrect namespace syntax");
       return;
     }
@@ -364,7 +364,7 @@
 
   if (!static_cast<bool>(cert))
     {
-      _LOG_DEBUG("cert is not found for " << interest);
+      NLSR_LOG_DEBUG("cert is not found for " << interest);
       return; // cert is not found
     }
 
@@ -384,7 +384,7 @@
 void
 Nlsr::onFaceEventNotification(const ndn::nfd::FaceEventNotification& faceEventNotification)
 {
-  _LOG_TRACE("Nlsr::onFaceEventNotification called");
+  NLSR_LOG_TRACE("Nlsr::onFaceEventNotification called");
 
   switch (faceEventNotification.getKind()) {
     case ndn::nfd::FACE_EVENT_DESTROYED: {
@@ -393,7 +393,7 @@
       auto adjacent = m_adjacencyList.findAdjacent(faceId);
 
       if (adjacent != m_adjacencyList.end()) {
-        _LOG_DEBUG("Face to " << adjacent->getName() << " with face id: " << faceId << " destroyed");
+        NLSR_LOG_DEBUG("Face to " << adjacent->getName() << " with face id: " << faceId << " destroyed");
 
         adjacent->setFaceId(0);
 
@@ -436,7 +436,7 @@
       // If we have a neighbor by that FaceUri and it has no FaceId, we
       // have a match.
       if (adjacent != m_adjacencyList.end()) {
-        _LOG_DEBUG("Face creation event matches neighbor: " << adjacent->getName()
+        NLSR_LOG_DEBUG("Face creation event matches neighbor: " << adjacent->getName()
                    << ". New Face ID: " << faceEventNotification.getFaceId()
                    << ". Registering prefixes.");
         adjacent->setFaceId(faceEventNotification.getFaceId());
@@ -461,7 +461,7 @@
 Nlsr::initializeFaces(const FetchDatasetCallback& onFetchSuccess,
                       const FetchDatasetTimeoutCallback& onFetchFailure)
 {
-  _LOG_TRACE("Initializing Faces...");
+  NLSR_LOG_TRACE("Initializing Faces...");
 
   m_faceDatasetController.fetch<ndn::nfd::FaceDataset>(onFetchSuccess, onFetchFailure);
 
@@ -470,7 +470,7 @@
 void
 Nlsr::processFaceDataset(const std::vector<ndn::nfd::FaceStatus>& faces)
 {
-  _LOG_DEBUG("Processing face dataset");
+  NLSR_LOG_DEBUG("Processing face dataset");
 
   // Iterate over each neighbor listed in nlsr.conf
   for (auto& adjacent : m_adjacencyList.getAdjList()) {
@@ -481,7 +481,7 @@
       // Set the adjacency FaceID if we find a URI match and it was
       // previously unset. Change the boolean to true.
       if (adjacent.getFaceId() == 0 && faceUriString == faceStatus.getRemoteUri()) {
-        _LOG_DEBUG("FaceUri: " << faceStatus.getRemoteUri() <<
+        NLSR_LOG_DEBUG("FaceUri: " << faceStatus.getRemoteUri() <<
                    " FaceId: "<< faceStatus.getFaceId());
         adjacent.setFaceId(faceStatus.getFaceId());
         // Register the prefixes for each neighbor
@@ -493,7 +493,7 @@
     // Face wasn't ready yet, or 2. NFD is configured
     // incorrectly and this Face isn't available.
     if (adjacent.getFaceId() == 0) {
-      _LOG_WARN("The adjacency " << adjacent.getName() <<
+      NLSR_LOG_WARN("The adjacency " << adjacent.getName() <<
                 " has no Face information in this dataset.");
     }
   }
@@ -531,17 +531,17 @@
                                 const std::string& msg,
                                 uint32_t nRetriesSoFar)
 {
-  _LOG_DEBUG("onFaceDatasetFetchTimeout");
+  NLSR_LOG_DEBUG("onFaceDatasetFetchTimeout");
   // If we have exceeded the maximum attempt count, do not try again.
   if (nRetriesSoFar++ < m_confParam.getFaceDatasetFetchTries()) {
-    _LOG_DEBUG("Failed to fetch dataset: " << msg << ". Attempting retry #" << nRetriesSoFar);
+    NLSR_LOG_DEBUG("Failed to fetch dataset: " << msg << ". Attempting retry #" << nRetriesSoFar);
     m_faceDatasetController.fetch<ndn::nfd::FaceDataset>(std::bind(&Nlsr::processFaceDataset,
                                                         this, _1),
                                               std::bind(&Nlsr::onFaceDatasetFetchTimeout,
                                                         this, _1, _2, nRetriesSoFar));
   }
   else {
-    _LOG_ERROR("Failed to fetch dataset: " << msg << ". Exceeded limit of " <<
+    NLSR_LOG_ERROR("Failed to fetch dataset: " << msg << ". Exceeded limit of " <<
                m_confParam.getFaceDatasetFetchTries() << ", so not trying again this time.");
     // If we fail to fetch it, just do nothing until the next
     // interval.  Since this is a backup mechanism, we aren't as
@@ -553,7 +553,7 @@
 void
 Nlsr::scheduleDatasetFetch()
 {
-  _LOG_DEBUG("Scheduling Dataset Fetch in " << m_confParam.getFaceDatasetFetchInterval()
+  NLSR_LOG_DEBUG("Scheduling Dataset Fetch in " << m_confParam.getFaceDatasetFetchInterval()
              << " seconds");
   m_scheduler.scheduleEvent(m_confParam.getFaceDatasetFetchInterval(),
     [this] {
diff --git a/src/publisher/lsdb-dataset-interest-handler.cpp b/src/publisher/lsdb-dataset-interest-handler.cpp
index 7a4ba1c..53cdfbc 100644
--- a/src/publisher/lsdb-dataset-interest-handler.cpp
+++ b/src/publisher/lsdb-dataset-interest-handler.cpp
@@ -54,7 +54,7 @@
   , m_localhostDispatcher(localHostDispatcher)
   , m_routerNameDispatcher(routerNameDispatcher)
 {
-  _LOG_DEBUG("Setting dispatcher for lsdb status dataset:");
+  NLSR_LOG_DEBUG("Setting dispatcher for lsdb status dataset:");
   setDispatcher(m_localhostDispatcher);
   setDispatcher(m_routerNameDispatcher);
 }
@@ -80,7 +80,7 @@
 LsdbDatasetInterestHandler::publishAdjStatus(const ndn::Name& topPrefix, const ndn::Interest& interest,
                                              ndn::mgmt::StatusDatasetContext& context)
 {
-  _LOG_DEBUG("Received interest:  " << interest);
+  NLSR_LOG_DEBUG("Received interest:  " << interest);
 
   auto lsaRange = std::make_pair<std::list<AdjLsa>::const_iterator,
                                  std::list<AdjLsa>::const_iterator>(
@@ -111,7 +111,7 @@
                                  std::list<CoordinateLsa>::const_iterator>(
     m_lsdb.getCoordinateLsdb().cbegin(), m_lsdb.getCoordinateLsdb().cend());
 
-  _LOG_DEBUG("Received interest:  " << interest);
+  NLSR_LOG_DEBUG("Received interest:  " << interest);
   for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
     tlv::CoordinateLsa tlvLsa;
     std::shared_ptr<tlv::LsaInfo> tlvLsaInfo = tlv::makeLsaInfo(*lsa);
@@ -132,7 +132,7 @@
 {
   auto lsaRange = std::make_pair<std::list<NameLsa>::const_iterator, std::list<NameLsa>::const_iterator>(
     m_lsdb.getNameLsdb().cbegin(), m_lsdb.getNameLsdb().cend());
-  _LOG_DEBUG("Received interest:  " << interest);
+  NLSR_LOG_DEBUG("Received interest:  " << interest);
   for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
     tlv::NameLsa tlvLsa;
 
@@ -153,7 +153,7 @@
 LsdbDatasetInterestHandler::publishAllStatus(const ndn::Name& topPrefix, const ndn::Interest& interest,
                                              ndn::mgmt::StatusDatasetContext& context)
 {
-  _LOG_DEBUG("Received interest:  " << interest);
+  NLSR_LOG_DEBUG("Received interest:  " << interest);
   tlv::LsdbStatus lsdbStatus;
   for (const tlv::AdjacencyLsa& tlvLsa : getTlvLsas<tlv::AdjacencyLsa>(m_lsdb)) {
     lsdbStatus.addAdjacencyLsa(tlvLsa);
diff --git a/src/route/face-map.cpp b/src/route/face-map.cpp
index 26d4390..95a37bf 100644
--- a/src/route/face-map.cpp
+++ b/src/route/face-map.cpp
@@ -20,12 +20,12 @@
  * \author A K M Mahmudul Hoque <ahoque1@memphis.edu>
  *
  **/
-#include <iostream>
-#include <utility>
-
+#include "face-map.hpp"
 #include "common.hpp"
 #include "logger.hpp"
-#include "face-map.hpp"
+
+#include <iostream>
+#include <utility>
 
 namespace nlsr {
 
@@ -34,9 +34,9 @@
 void
 FaceMap::writeLog()
 {
-  _LOG_DEBUG("------- Face Map-----------");
+  NLSR_LOG_DEBUG("------- Face Map-----------");
   for (const auto& it : m_table) {
-    _LOG_DEBUG("Face Map Entry (FaceUri: " << (it.second).getFaceUri()
+    NLSR_LOG_DEBUG("Face Map Entry (FaceUri: " << (it.second).getFaceUri()
                << " Face Id: " << (it.second).getFaceId() << ")");
   }
 }
diff --git a/src/route/fib-entry.cpp b/src/route/fib-entry.cpp
index 91eb422..4a4498a 100644
--- a/src/route/fib-entry.cpp
+++ b/src/route/fib-entry.cpp
@@ -28,8 +28,8 @@
 void
 FibEntry::writeLog()
 {
-  _LOG_DEBUG("Name Prefix: " << m_name);
-  _LOG_DEBUG("Seq No: " << m_seqNo);
+  NLSR_LOG_DEBUG("Name Prefix: " << m_name);
+  NLSR_LOG_DEBUG("Seq No: " << m_seqNo);
   m_nexthopList.writeLog();
 }
 
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 752b15a..d8a9909 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -38,7 +38,7 @@
 void
 Fib::remove(const ndn::Name& name)
 {
-  _LOG_DEBUG("Fib::remove called");
+  NLSR_LOG_DEBUG("Fib::remove called");
   std::map<ndn::Name, FibEntry>::iterator it = m_table.find(name);
   if (it != m_table.end()) {
     for (std::set<NextHop, NextHopComparator>::iterator nhit =
@@ -78,7 +78,7 @@
 void
 Fib::update(const ndn::Name& name, NexthopList& allHops)
 {
-  _LOG_DEBUG("Fib::update called");
+  NLSR_LOG_DEBUG("Fib::update called");
 
   // Get the max possible faces which is the minumum of the configuration setting and
   // the length of the list of all next hops.
@@ -97,7 +97,7 @@
 
   // New FIB entry that has nextHops
   if (entryIt == m_table.end() && hopsToAdd.size() != 0) {
-    _LOG_DEBUG("New FIB Entry");
+    NLSR_LOG_DEBUG("New FIB Entry");
 
     FibEntry entry(name);
 
@@ -110,7 +110,7 @@
   // Existing FIB entry that may or may not have nextHops
   else {
     // Existing FIB entry
-    _LOG_DEBUG("Existing FIB Entry");
+    NLSR_LOG_DEBUG("Existing FIB Entry");
 
     // Remove empty FIB entry
     if (hopsToAdd.size() == 0) {
@@ -132,7 +132,7 @@
       if (isUpdatable) {
         unregisterPrefix(entry.getName(), hop.getConnectingFaceUri());
       }
-      _LOG_DEBUG("Removing " << hop.getConnectingFaceUri() << " from " << entry.getName());
+      NLSR_LOG_DEBUG("Removing " << hop.getConnectingFaceUri() << " from " << entry.getName());
       entry.getNexthopList().removeNextHop(hop);
     }
 
@@ -153,11 +153,11 @@
 void
 Fib::clean()
 {
-  _LOG_DEBUG("Fib::clean called");
+  NLSR_LOG_DEBUG("Fib::clean called");
   for (std::map<ndn::Name, FibEntry>::iterator it = m_table.begin();
        it != m_table.end();
        ++it) {
-    _LOG_DEBUG("Cancelling Scheduled event. Name: " << it->second.getName());
+    NLSR_LOG_DEBUG("Cancelling Scheduled event. Name: " << it->second.getName());
     cancelEntryRefresh(it->second);
     for (std::set<NextHop, NextHopComparator>::iterator nhit =
          (it->second).getNexthopList().getNextHops().begin();
@@ -213,7 +213,7 @@
      .setExpirationPeriod(timeout)
      .setOrigin(ndn::nfd::ROUTE_ORIGIN_NLSR);
 
-    _LOG_DEBUG("Registering prefix: " << faceParameters.getName() << " faceUri: " << faceUri);
+    NLSR_LOG_DEBUG("Registering prefix: " << faceParameters.getName() << " faceUri: " << faceUri);
     m_controller.start<ndn::nfd::RibRegisterCommand>(faceParameters,
                                                    std::bind(&Fib::onRegistrationSuccess, this, _1,
                                                              "Successful in name registration",
@@ -225,7 +225,7 @@
                                                              faceUri, times));
   }
   else {
-    _LOG_WARN("Error: No Face Id for face uri: " << faceUri);
+    NLSR_LOG_WARN("Error: No Face Id for face uri: " << faceUri);
   }
 }
 
@@ -233,7 +233,7 @@
 Fib::onRegistrationSuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
                            const std::string& message, const ndn::util::FaceUri& faceUri)
 {
-  _LOG_DEBUG(message << ": " << commandSuccessResult.getName() <<
+  NLSR_LOG_DEBUG(message << ": " << commandSuccessResult.getName() <<
              " Face Uri: " << faceUri << " faceId: " << commandSuccessResult.getFaceId());
 
   AdjacencyList::iterator adjacent = m_adjacencyList.findAdjacent(faceUri);
@@ -253,17 +253,17 @@
                            const ndn::util::FaceUri& faceUri,
                            uint8_t times)
 {
-  _LOG_DEBUG(message << ": " << response.getText() << " (code: " << response.getCode() << ")");
-  _LOG_DEBUG("Prefix: " << parameters.getName() << " failed for: " << times);
+  NLSR_LOG_DEBUG(message << ": " << response.getText() << " (code: " << response.getCode() << ")");
+  NLSR_LOG_DEBUG("Prefix: " << parameters.getName() << " failed for: " << times);
   if (times < 3) {
-    _LOG_DEBUG("Trying to register again...");
+    NLSR_LOG_DEBUG("Trying to register again...");
     registerPrefix(parameters.getName(), faceUri,
                    parameters.getCost(),
                    parameters.getExpirationPeriod(),
                    parameters.getFlags(), times+1);
   }
   else {
-    _LOG_DEBUG("Registration trial given up");
+    NLSR_LOG_DEBUG("Registration trial given up");
   }
 }
 
@@ -271,7 +271,7 @@
 Fib::unregisterPrefix(const ndn::Name& namePrefix, const std::string& faceUri)
 {
   uint32_t faceId = m_faceMap.getFaceId(faceUri);
-  _LOG_DEBUG("Unregister prefix: " << namePrefix << " Face Uri: " << faceUri);
+  NLSR_LOG_DEBUG("Unregister prefix: " << namePrefix << " Face Uri: " << faceUri);
   if (faceId > 0) {
     ndn::nfd::ControlParameters controlParameters;
     controlParameters
@@ -291,7 +291,7 @@
 Fib::onUnregistrationSuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
                              const std::string& message)
 {
-  _LOG_DEBUG("Unregister successful Prefix: " << commandSuccessResult.getName() <<
+  NLSR_LOG_DEBUG("Unregister successful Prefix: " << commandSuccessResult.getName() <<
              " Face Id: " << commandSuccessResult.getFaceId());
 }
 
@@ -299,7 +299,7 @@
 Fib::onUnregistrationFailure(const ndn::nfd::ControlResponse& response,
                              const std::string& message)
 {
-  _LOG_DEBUG(message << ": " << response.getText() << " (code: " << response.getCode() << ")");
+  NLSR_LOG_DEBUG(message << ": " << response.getText() << " (code: " << response.getCode() << ")");
 }
 
 void
@@ -323,7 +323,7 @@
 Fib::onSetStrategySuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
                          const std::string& message)
 {
-  _LOG_DEBUG(message << ": " << commandSuccessResult.getStrategy() << " "
+  NLSR_LOG_DEBUG(message << ": " << commandSuccessResult.getStrategy() << " "
             << "for name: " << commandSuccessResult.getName());
 }
 
@@ -333,7 +333,7 @@
                           uint32_t count,
                           const std::string& message)
 {
-  _LOG_DEBUG(message << ": " << parameters.getStrategy() << " "
+  NLSR_LOG_DEBUG(message << ": " << parameters.getStrategy() << " "
             << "for name: " << parameters.getName());
   if (count < 3) {
     setStrategy(parameters.getName(), parameters.getStrategy().toUri(),count+1);
@@ -343,7 +343,7 @@
 void
 Fib::scheduleEntryRefresh(FibEntry& entry, const afterRefreshCallback& refreshCallback)
 {
-  _LOG_DEBUG("Scheduling refresh for " << entry.getName()
+  NLSR_LOG_DEBUG("Scheduling refresh for " << entry.getName()
                                        << " Seq Num: " << entry.getSeqNo()
                                        << " in " << m_refreshTime << " seconds");
 
@@ -362,7 +362,7 @@
 void
 Fib::cancelEntryRefresh(const FibEntry& entry)
 {
-  _LOG_DEBUG("Cancelling refresh for " << entry.getName() << " Seq Num: " << entry.getSeqNo());
+  NLSR_LOG_DEBUG("Cancelling refresh for " << entry.getName() << " Seq Num: " << entry.getSeqNo());
 
   m_scheduler.cancelEvent(entry.getRefreshEventId());
   entry.getRefreshEventId().reset();
@@ -378,7 +378,7 @@
   }
 
   FibEntry& entry = it->second;
-  _LOG_DEBUG("Refreshing " << entry.getName() << " Seq Num: " << entry.getSeqNo());
+  NLSR_LOG_DEBUG("Refreshing " << entry.getName() << " Seq Num: " << entry.getSeqNo());
 
   // Increment sequence number
     entry.setSeqNo(entry.getSeqNo() + 1);
@@ -397,7 +397,7 @@
 void
 Fib::writeLog()
 {
-  _LOG_DEBUG("-------------------FIB-----------------------------");
+  NLSR_LOG_DEBUG("-------------------FIB-----------------------------");
   for (std::map<ndn::Name, FibEntry>::iterator it = m_table.begin();
        it != m_table.end();
        ++it) {
diff --git a/src/route/map.cpp b/src/route/map.cpp
index d43e058..82f73b0 100644
--- a/src/route/map.cpp
+++ b/src/route/map.cpp
@@ -83,10 +83,10 @@
 void
 Map::writeLog()
 {
-  _LOG_DEBUG("---------------Map----------------------");
+  NLSR_LOG_DEBUG("---------------Map----------------------");
   auto&& routerNameView = m_entries.get<detail::byRouterName>();
   for (auto entry = routerNameView.begin(); entry != routerNameView.end(); entry++) {
-    _LOG_DEBUG("MapEntry: ( Router: " << entry->getRouter() << " Mapping No: "
+    NLSR_LOG_DEBUG("MapEntry: ( Router: " << entry->getRouter() << " Mapping No: "
                << entry->getMappingNumber() << " )");
   }
 }
diff --git a/src/route/name-prefix-table-entry.cpp b/src/route/name-prefix-table-entry.cpp
index 298a2ef..2403003 100644
--- a/src/route/name-prefix-table-entry.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -55,7 +55,7 @@
     m_rteList.erase(iterator);
   }
   else {
-    _LOG_ERROR("Routing entry for: " << entryPtr->getDestination()
+    NLSR_LOG_ERROR("Routing entry for: " << entryPtr->getDestination()
                << " not found in NPT entry: " << getNamePrefix());
   }
   return entryPtr->getUseCount();
@@ -81,10 +81,10 @@
 void
 NamePrefixTableEntry::writeLog()
 {
-  _LOG_DEBUG("Name: " << m_namePrefix);
+  NLSR_LOG_DEBUG("Name: " << m_namePrefix);
   for (auto it = m_rteList.begin(); it != m_rteList.end(); ++it) {
-    _LOG_DEBUG("Destination: " << (*it)->getDestination());
-    _LOG_DEBUG("Nexthops: ");
+    NLSR_LOG_DEBUG("Destination: " << (*it)->getDestination());
+    NLSR_LOG_DEBUG("Nexthops: ");
     (*it)->getNexthopList().writeLog();
   }
   m_nexthopList.writeLog();
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index 52271ef..4496f6c 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -99,7 +99,7 @@
   std::shared_ptr<NamePrefixTableEntry> npte;
   // Either we have to make a new NPT entry or there already was one.
   if (nameItr == m_table.end()) {
-    _LOG_DEBUG("Adding origin: " << rtpePtr->getDestination()
+    NLSR_LOG_DEBUG("Adding origin: " << rtpePtr->getDestination()
                << " to a new name prefix: " << name);
     npte = make_shared<NamePrefixTableEntry>(name);
     npte->addRoutingTableEntry(rtpePtr);
@@ -107,7 +107,7 @@
     m_table.push_back(npte);
     // If this entry has next hops, we need to inform the FIB
     if (npte->getNexthopList().size() > 0) {
-      _LOG_TRACE("Updating FIB with next hops for " << npte);
+      NLSR_LOG_TRACE("Updating FIB with next hops for " << npte);
       m_nlsr.getFib().update(name, npte->getNexthopList());
     }
     // The routing table may recalculate and add a routing table entry
@@ -117,23 +117,23 @@
     // remain in the Name Prefix Table as a future routing table
     // calculation may add next hops.
     else {
-      _LOG_TRACE(*npte << " has no next hops; removing from FIB");
+      NLSR_LOG_TRACE(*npte << " has no next hops; removing from FIB");
       m_nlsr.getFib().remove(name);
     }
   }
   else {
     npte = *nameItr;
-    _LOG_TRACE("Adding origin: " << rtpePtr->getDestination()
+    NLSR_LOG_TRACE("Adding origin: " << rtpePtr->getDestination()
                << " to existing prefix: " << *nameItr);
     (*nameItr)->addRoutingTableEntry(rtpePtr);
     (*nameItr)->generateNhlfromRteList();
 
     if ((*nameItr)->getNexthopList().size() > 0) {
-      _LOG_TRACE("Updating FIB with next hops for " << (*nameItr));
+      NLSR_LOG_TRACE("Updating FIB with next hops for " << (*nameItr));
       m_nlsr.getFib().update(name, (*nameItr)->getNexthopList());
     }
     else {
-      _LOG_TRACE((*nameItr) << " has no next hops; removing from FIB");
+      NLSR_LOG_TRACE((*nameItr) << " has no next hops; removing from FIB");
       m_nlsr.getFib().remove(name);
     }
   }
@@ -145,7 +145,7 @@
 void
 NamePrefixTable::removeEntry(const ndn::Name& name, const ndn::Name& destRouter)
 {
-  _LOG_DEBUG("Removing origin: " << destRouter << " from " << name);
+  NLSR_LOG_DEBUG("Removing origin: " << destRouter << " from " << name);
 
   // Fetch an iterator to the appropriate pair object in the pool.
   RoutingTableEntryPool::iterator rtpeItr = m_rtpool.find(destRouter);
@@ -153,7 +153,7 @@
   // Simple error checking to prevent any unusual behavior in the case
   // that we try to remove an entry that isn't there.
   if (rtpeItr == m_rtpool.end()) {
-    _LOG_DEBUG("No entry for origin: " << destRouter
+    NLSR_LOG_DEBUG("No entry for origin: " << destRouter
                << " found, so it cannot be removed from prefix: "
                << name);
     return;
@@ -167,7 +167,7 @@
                    return entry->getNamePrefix() == name;
                  });
   if (nameItr != m_table.end()) {
-    _LOG_TRACE("Removing origin: " << rtpePtr->getDestination()
+    NLSR_LOG_TRACE("Removing origin: " << rtpePtr->getDestination()
                << " from prefix: " << **nameItr);
 
     // Rather than iterating through the whole list periodically, just
@@ -192,20 +192,20 @@
     //   new entry for the prefix will be created.
     //
     if ((*nameItr)->getRteListSize() == 0) {
-      _LOG_TRACE(**nameItr << " has no routing table entries;"
+      NLSR_LOG_TRACE(**nameItr << " has no routing table entries;"
                  << " removing from table and FIB");
       m_table.erase(nameItr);
       m_nlsr.getFib().remove(name);
     }
     else {
-      _LOG_TRACE(**nameItr << " has other routing table entries;"
+      NLSR_LOG_TRACE(**nameItr << " has other routing table entries;"
                  << " updating FIB with next hops");
       (*nameItr)->generateNhlfromRteList();
       m_nlsr.getFib().update(name, (*nameItr)->getNexthopList());
     }
   }
   else {
-    _LOG_DEBUG("Attempted to remove origin: " << rtpePtr->getDestination()
+    NLSR_LOG_DEBUG("Attempted to remove origin: " << rtpePtr->getDestination()
                << " from non-existent prefix: " << name);
   }
 }
@@ -213,7 +213,7 @@
 void
 NamePrefixTable::updateWithNewRoute(const std::list<RoutingTableEntry>& entries)
 {
-  _LOG_DEBUG("Updating table with newly calculated routes");
+  NLSR_LOG_DEBUG("Updating table with newly calculated routes");
 
   // Iterate over each pool entry we have
   for (auto&& poolEntryPair : m_rtpool) {
@@ -225,7 +225,7 @@
     // If this pool entry has a corresponding entry in the routing table now
     if (sourceEntry != entries.end()
         && poolEntry->getNexthopList() != sourceEntry->getNexthopList()) {
-      _LOG_DEBUG("Routing entry: " << poolEntry->getDestination() << " has changed next-hops.");
+      NLSR_LOG_DEBUG("Routing entry: " << poolEntry->getDestination() << " has changed next-hops.");
       poolEntry->setNexthopList(sourceEntry->getNexthopList());
       for (const auto& nameEntry : poolEntry->namePrefixTableEntries) {
         auto nameEntryFullPtr = nameEntry.second.lock();
@@ -233,7 +233,7 @@
       }
     }
     else if (sourceEntry == entries.end()) {
-      _LOG_DEBUG("Routing entry: " << poolEntry->getDestination() << " now has no next-hops.");
+      NLSR_LOG_DEBUG("Routing entry: " << poolEntry->getDestination() << " now has no next-hops.");
       poolEntry->getNexthopList().reset();
       for (const auto& nameEntry : poolEntry->namePrefixTableEntries) {
         auto nameEntryFullPtr = nameEntry.second.lock();
@@ -241,7 +241,7 @@
       }
     }
     else {
-      _LOG_TRACE("No change in routing entry:" << poolEntry->getDestination()
+      NLSR_LOG_TRACE("No change in routing entry:" << poolEntry->getDestination()
                  << ", no action necessary.");
     }
   }
@@ -271,7 +271,7 @@
 NamePrefixTable::deleteRtpeFromPool(std::shared_ptr<RoutingTablePoolEntry> rtpePtr)
 {
   if (m_rtpool.erase(rtpePtr->getDestination()) != 1) {
-    _LOG_DEBUG("Attempted to delete non-existent origin: "
+    NLSR_LOG_DEBUG("Attempted to delete non-existent origin: "
                << rtpePtr->getDestination()
                << " from NPT routing table entry storage pool.");
   }
@@ -280,7 +280,7 @@
 void
 NamePrefixTable::writeLog()
 {
-  _LOG_DEBUG(*this);
+  NLSR_LOG_DEBUG(*this);
 }
 
 std::ostream&
diff --git a/src/route/nexthop-list.cpp b/src/route/nexthop-list.cpp
index 65f6782..a0a585a 100644
--- a/src/route/nexthop-list.cpp
+++ b/src/route/nexthop-list.cpp
@@ -113,7 +113,7 @@
 
   for (std::set<NextHop, NextHopComparator>::iterator it = m_nexthopList.begin();
        it != m_nexthopList.end() ; it++, i++) {
-    _LOG_DEBUG("Nexthop " << i << ": " << (*it).getConnectingFaceUri()
+    NLSR_LOG_DEBUG("Nexthop " << i << ": " << (*it).getConnectingFaceUri()
                << " Route Cost: " << (*it).getRouteCost());
   }
 }
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index c5f8e09..c7b7d08 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -104,7 +104,7 @@
           correctedCost = std::max(toCost, fromCost);
         }
 
-        _LOG_WARN("Cost between [" << row << "][" << col << "] and [" << col << "][" << row <<
+        NLSR_LOG_WARN("Cost between [" << row << "][" << col << "] and [" << col << "][" << row <<
                   "] are not the same (" << toCost << " != " << fromCost << "). " <<
                   "Correcting to cost: " << correctedCost);
 
@@ -124,7 +124,7 @@
       line += boost::lexical_cast<std::string>(adjMatrix[i][j]);
       line += " ";
     }
-    _LOG_DEBUG(line);
+    NLSR_LOG_DEBUG(line);
   }
 }
 
@@ -206,7 +206,7 @@
 LinkStateRoutingTableCalculator::calculatePath(Map& pMap,
                                                RoutingTable& rt, Nlsr& pnlsr)
 {
-  _LOG_DEBUG("LinkStateRoutingTableCalculator::calculatePath Called");
+  NLSR_LOG_DEBUG("LinkStateRoutingTableCalculator::calculatePath Called");
   allocateAdjMatrix();
   initMatrix();
   makeAdjMatrix(pnlsr, pMap);
@@ -300,7 +300,7 @@
 LinkStateRoutingTableCalculator::addAllLsNextHopsToRoutingTable(Nlsr& pnlsr, RoutingTable& rt,
                                                                 Map& pMap, uint32_t sourceRouter)
 {
-  _LOG_DEBUG("LinkStateRoutingTableCalculator::addAllNextHopsToRoutingTable Called");
+  NLSR_LOG_DEBUG("LinkStateRoutingTableCalculator::addAllNextHopsToRoutingTable Called");
 
   int nextHopRouter = 0;
 
@@ -407,7 +407,7 @@
 HyperbolicRoutingCalculator::calculatePaths(Map& map, RoutingTable& rt,
                                             Lsdb& lsdb, AdjacencyList& adjacencies)
 {
-  _LOG_TRACE("Calculating hyperbolic paths");
+  NLSR_LOG_TRACE("Calculating hyperbolic paths");
 
   ndn::optional<int32_t> thisRouter = map.getMappingNoByRouterName(m_thisRouterName);
 
@@ -417,7 +417,7 @@
 
     // Don't calculate nexthops using an inactive router
     if (adj->getStatus() == Adjacent::STATUS_INACTIVE) {
-      _LOG_TRACE(adj->getName() << " is inactive; not using it as a nexthop");
+      NLSR_LOG_TRACE(adj->getName() << " is inactive; not using it as a nexthop");
       continue;
     }
 
@@ -436,7 +436,7 @@
     ndn::optional<int32_t> src = map.getMappingNoByRouterName(srcRouterName);
 
     if (!src) {
-      _LOG_WARN(adj->getName() << " does not exist in the router map!");
+      NLSR_LOG_WARN(adj->getName() << " does not exist in the router map!");
       continue;
     }
 
@@ -451,7 +451,7 @@
 
           // Could not compute distance
           if (distance == UNKNOWN_DISTANCE) {
-            _LOG_WARN("Could not calculate hyperbolic distance from " << srcRouterName << " to " <<
+            NLSR_LOG_WARN("Could not calculate hyperbolic distance from " << srcRouterName << " to " <<
                       *destRouterName);
             continue;
           }
@@ -467,7 +467,7 @@
 HyperbolicRoutingCalculator::getHyperbolicDistance(Map& map, Lsdb& lsdb,
                                                    ndn::Name src, ndn::Name dest)
 {
-  _LOG_TRACE("Calculating hyperbolic distance from " << src << " to " << dest);
+  NLSR_LOG_TRACE("Calculating hyperbolic distance from " << src << " to " << dest);
 
   double distance = UNKNOWN_DISTANCE;
 
@@ -502,7 +502,7 @@
   // double r_i, double r_j, double delta_theta, double zeta = 1 (default)
   distance = calculateHyperbolicDistance(srcRadius, destRadius, diffTheta);
 
-  _LOG_TRACE("Distance from " << src << " to " << dest << " is " << distance);
+  NLSR_LOG_TRACE("Distance from " << src << " to " << dest << " is " << distance);
 
   return distance;
 }
@@ -517,7 +517,7 @@
 
   // Check if two vector lengths are the same
   if (angleVectorI.size() != angleVectorJ.size()) {
-    _LOG_ERROR("Angle vector sizes do not match");
+    NLSR_LOG_ERROR("Angle vector sizes do not match");
     return UNKNOWN_DISTANCE;
   }
 
@@ -526,20 +526,20 @@
     for (unsigned int k = 0; k < angleVectorI.size() - 1; k++) {
       if ((angleVectorI[k] > M_PI && angleVectorI[k] < 0.0) ||
           (angleVectorJ[k] > M_PI && angleVectorJ[k] < 0.0)) {
-        _LOG_ERROR("Angle outside [0, PI]");
+        NLSR_LOG_ERROR("Angle outside [0, PI]");
         return UNKNOWN_DISTANCE;
       }
     }
   }
   if (angleVectorI[angleVectorI.size()-1] > 2.*M_PI ||
       angleVectorI[angleVectorI.size()-1] < 0.0) {
-    _LOG_ERROR("Angle not within [0, 2PI]");
+    NLSR_LOG_ERROR("Angle not within [0, 2PI]");
     return UNKNOWN_DISTANCE;
   }
 
   if (angleVectorI[angleVectorI.size()-1] > 2.*M_PI ||
       angleVectorI[angleVectorI.size()-1] < 0.0) {
-    _LOG_ERROR("Angle not within [0, 2PI]");
+    NLSR_LOG_ERROR("Angle not within [0, 2PI]");
     return UNKNOWN_DISTANCE;
   }
 
@@ -593,7 +593,7 @@
   double zeta = 1;
 
   if (deltaTheta <= 0.0 || rI <= 0.0 || rJ <= 0.0) {
-    _LOG_ERROR("Delta theta or rI or rJ is <= 0");
+    NLSR_LOG_ERROR("Delta theta or rI or rJ is <= 0");
     return UNKNOWN_DISTANCE;
   }
 
@@ -609,7 +609,7 @@
   NextHop hop(faceUri, cost);
   hop.setHyperbolic(true);
 
-  _LOG_TRACE("Calculated " << hop << " for destination: " << dest);
+  NLSR_LOG_TRACE("Calculated " << hop << " for destination: " << dest);
 
   if (m_isDryRun) {
     rt.addNextHopToDryTable(dest, hop);
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index a414e8a..81fb9cb 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -67,12 +67,12 @@
          .doesLsaExist(ndn::Name{pnlsr.getConfParameter().getRouterPrefix()}
                        .append(std::to_string(Lsa::Type::COORDINATE)), Lsa::Type::COORDINATE))) {
       if (pnlsr.getIsBuildAdjLsaSheduled() != 1) {
-        _LOG_TRACE("Clearing old routing table");
+        NLSR_LOG_TRACE("Clearing old routing table");
         clearRoutingTable();
         // for dry run options
         clearDryRoutingTable();
 
-        _LOG_DEBUG("Calculating routing table");
+        NLSR_LOG_DEBUG("Calculating routing table");
 
         // calculate Link State routing
         if ((pnlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_OFF)
@@ -88,24 +88,24 @@
           calculateHypDryRoutingTable(pnlsr);
         }
         // Inform the NPT that updates have been made
-        _LOG_DEBUG("Calling Update NPT With new Route");
+        NLSR_LOG_DEBUG("Calling Update NPT With new Route");
         (*afterRoutingChange)(m_rTable);
         writeLog(pnlsr.getConfParameter().getHyperbolicState());
         pnlsr.getNamePrefixTable().writeLog();
         pnlsr.getFib().writeLog();
       }
       else {
-        _LOG_DEBUG("Adjacency building is scheduled, so"
+        NLSR_LOG_DEBUG("Adjacency building is scheduled, so"
                    " routing table can not be calculated :(");
       }
     }
     else {
-      _LOG_DEBUG("No Adj LSA of router itself,"
+      NLSR_LOG_DEBUG("No Adj LSA of router itself,"
                  " so Routing table can not be calculated :(");
       clearRoutingTable();
       clearDryRoutingTable(); // for dry run options
       // need to update NPT here
-      _LOG_DEBUG("Calling Update NPT With new Route");
+      NLSR_LOG_DEBUG("Calling Update NPT With new Route");
       (*afterRoutingChange)(m_rTable);
       writeLog(pnlsr.getConfParameter().getHyperbolicState());
       pnlsr.getNamePrefixTable().writeLog();
@@ -123,7 +123,7 @@
 void
 RoutingTable::calculateLsRoutingTable(Nlsr& nlsr)
 {
-  _LOG_DEBUG("RoutingTable::calculateLsRoutingTable Called");
+  NLSR_LOG_DEBUG("RoutingTable::calculateLsRoutingTable Called");
 
   Map map;
   map.createFromAdjLsdb(nlsr.getLsdb().getAdjLsdb().begin(), nlsr.getLsdb().getAdjLsdb().end());
@@ -173,7 +173,7 @@
 RoutingTable::scheduleRoutingTableCalculation(Nlsr& pnlsr)
 {
   if (pnlsr.getIsRouteCalculationScheduled() != true) {
-    _LOG_DEBUG("Scheduling routing table calculation in " << m_routingCalcInterval);
+    NLSR_LOG_DEBUG("Scheduling routing table calculation in " << m_routingCalcInterval);
 
     m_scheduler.scheduleEvent(m_routingCalcInterval,
                               std::bind(&RoutingTable::calculate, this, std::ref(pnlsr)));
@@ -191,7 +191,7 @@
 void
 RoutingTable::addNextHop(const ndn::Name& destRouter, NextHop& nh)
 {
-  _LOG_DEBUG("Adding " << nh << " for destination: " << destRouter);
+  NLSR_LOG_DEBUG("Adding " << nh << " for destination: " << destRouter);
 
   RoutingTableEntry* rteChk = findRoutingTableEntry(destRouter);
   if (rteChk == 0) {
@@ -220,20 +220,20 @@
 void
 RoutingTable::writeLog(int hyperbolicState)
 {
-  _LOG_DEBUG("---------------Routing Table------------------");
+  NLSR_LOG_DEBUG("---------------Routing Table------------------");
   for (std::list<RoutingTableEntry>::iterator it = m_rTable.begin() ;
        it != m_rTable.end(); ++it) {
-    _LOG_DEBUG("Destination: " << (*it).getDestination());
-    _LOG_DEBUG("Nexthops: ");
+    NLSR_LOG_DEBUG("Destination: " << (*it).getDestination());
+    NLSR_LOG_DEBUG("Nexthops: ");
     (*it).getNexthopList().writeLog();
   }
 
   if (hyperbolicState == HYPERBOLIC_STATE_DRY_RUN) {
-    _LOG_DEBUG("--------Hyperbolic Routing Table(Dry)---------");
+    NLSR_LOG_DEBUG("--------Hyperbolic Routing Table(Dry)---------");
     for (std::list<RoutingTableEntry>::iterator it = m_dryTable.begin() ;
         it != m_dryTable.end(); ++it) {
-      _LOG_DEBUG("Destination: " << (*it).getDestination());
-      _LOG_DEBUG("Nexthops: ");
+      NLSR_LOG_DEBUG("Destination: " << (*it).getDestination());
+      NLSR_LOG_DEBUG("Nexthops: ");
       (*it).getNexthopList().writeLog();
     }
   }
@@ -242,7 +242,7 @@
 void
 RoutingTable::addNextHopToDryTable(const ndn::Name& destRouter, NextHop& nh)
 {
-  _LOG_DEBUG("Adding " << nh << " to dry table for destination: " << destRouter);
+  NLSR_LOG_DEBUG("Adding " << nh << " to dry table for destination: " << destRouter);
 
   std::list<RoutingTableEntry>::iterator it = std::find_if(m_dryTable.begin(),
                                                            m_dryTable.end(),
diff --git a/src/sequencing-manager.cpp b/src/sequencing-manager.cpp
index 810be68..cdcbad9 100644
--- a/src/sequencing-manager.cpp
+++ b/src/sequencing-manager.cpp
@@ -50,7 +50,7 @@
 void
 SequencingManager::initiateSeqNoFromFile(int hypState)
 {
-  _LOG_DEBUG("Seq File Name: " << m_seqFileNameWithPath);
+  NLSR_LOG_DEBUG("Seq File Name: " << m_seqFileNameWithPath);
   std::ifstream inputFile(m_seqFileNameWithPath.c_str());
 
   // Good checks that file is not (bad or eof or fail)
@@ -74,7 +74,7 @@
     // lsaOrCombinedSeqNo != CorLsaSeq
     if (m_nameLsaSeq == 0 && m_adjLsaSeq == 0 && m_corLsaSeq == 0 &&
         lsaOrCombinedSeqNo != "CorLsaSeq") {
-      _LOG_DEBUG("Old file had combined sequence number: " << lsaOrCombinedSeqNo);
+      NLSR_LOG_DEBUG("Old file had combined sequence number: " << lsaOrCombinedSeqNo);
       std::istringstream iss(lsaOrCombinedSeqNo);
       iss >> seqNo;
       m_adjLsaSeq = (seqNo & 0xFFFFF);
@@ -89,7 +89,7 @@
     // Increment the adjacency LSA seq. no. if link-state or dry HR is enabled
     if (hypState != HYPERBOLIC_STATE_ON) {
       if (m_corLsaSeq != 0) {
-        _LOG_WARN("This router was previously configured for hyperbolic"
+        NLSR_LOG_WARN("This router was previously configured for hyperbolic"
                    << " routing without clearing the seq. no. file.");
         m_corLsaSeq = 0;
       }
@@ -99,7 +99,7 @@
     // Similarly, increment the coordinate LSA seq. no only if link-state is disabled.
     if (hypState != HYPERBOLIC_STATE_OFF) {
       if (m_adjLsaSeq != 0) {
-        _LOG_WARN("This router was previously configured for link-state"
+        NLSR_LOG_WARN("This router was previously configured for link-state"
                   << " routing without clearing the seq. no. file.");
         m_adjLsaSeq = 0;
       }
@@ -127,10 +127,10 @@
 void
 SequencingManager::writeLog() const
 {
-  _LOG_DEBUG("----SequencingManager----");
-  _LOG_DEBUG("Adj LSA seq no: " << m_adjLsaSeq);
-  _LOG_DEBUG("Cor LSA Seq no: " << m_corLsaSeq);
-  _LOG_DEBUG("Name LSA Seq no: " << m_nameLsaSeq);
+  NLSR_LOG_DEBUG("----SequencingManager----");
+  NLSR_LOG_DEBUG("Adj LSA seq no: " << m_adjLsaSeq);
+  NLSR_LOG_DEBUG("Cor LSA Seq no: " << m_corLsaSeq);
+  NLSR_LOG_DEBUG("Name LSA Seq no: " << m_nameLsaSeq);
 }
 
 } // namespace nlsr
diff --git a/src/update/manager-base.cpp b/src/update/manager-base.cpp
index 47ff076..5a1034c 100644
--- a/src/update/manager-base.cpp
+++ b/src/update/manager-base.cpp
@@ -61,7 +61,7 @@
 
   // Only build a Name LSA if the added name is new
   if (m_namePrefixList.insert(castParams.getName())) {
-    _LOG_INFO("Advertising/Inserting name: " << castParams.getName() << "\n");
+    NLSR_LOG_INFO("Advertising/Inserting name: " << castParams.getName() << "\n");
     m_lsdb.buildAndInstallOwnNameLsa();
     return done(ndn::nfd::ControlResponse(200, "OK").setBody(parameters.wireEncode()));
   }
@@ -80,7 +80,7 @@
 
   // Only build a Name LSA if the added name is new
   if (m_namePrefixList.remove(castParams.getName())) {
-    _LOG_INFO("Withdrawing/Removing name: " << castParams.getName() << "\n");
+    NLSR_LOG_INFO("Withdrawing/Removing name: " << castParams.getName() << "\n");
     m_lsdb.buildAndInstallOwnNameLsa();
     return done(ndn::nfd::ControlResponse(200, "OK").setBody(parameters.wireEncode()));
   }
diff --git a/src/update/prefix-update-processor.cpp b/src/update/prefix-update-processor.cpp
index 6146441..4ad75dd 100644
--- a/src/update/prefix-update-processor.cpp
+++ b/src/update/prefix-update-processor.cpp
@@ -60,7 +60,7 @@
   : CommandManagerBase(dispatcher, namePrefixList, lsdb, "prefix-update")
   , m_validator(face, broadcastPrefix, certificateCache, certStore)
 {
-  _LOG_DEBUG("Setting dispatcher to capture Interests for: "
+  NLSR_LOG_DEBUG("Setting dispatcher to capture Interests for: "
     << ndn::Name(Nlsr::LOCALHOST_PREFIX).append("prefix-update"));
 
   m_dispatcher.addControlCommand<ndn::nfd::ControlParameters>(makeRelPrefix("advertise"),
@@ -88,12 +88,12 @@
 
         auto signer1 = getSignerFromTag(*request);
         std::string signer = signer1.value_or("*");
-        _LOG_DEBUG("accept " << request->getName() << " signer=" << signer);
+        NLSR_LOG_DEBUG("accept " << request->getName() << " signer=" << signer);
         accept(signer);
       },
       [reject] (const std::shared_ptr<const ndn::Interest>& request,
                 const std::string& failureInfo) {
-        _LOG_DEBUG("reject " << request->getName() << " signer=" <<
+        NLSR_LOG_DEBUG("reject " << request->getName() << " signer=" <<
                       getSignerFromTag(*request).value_or("?") << ' ' << failureInfo);
         reject(ndn::mgmt::RejectReply::STATUS403);
       });