rename log macros to comply with ISO C++ standard

refs: #4341

Change-Id: Idb05f59660f42c01a7bf014c6fff4125a28327f2
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(),