src: Adding log4cxx logging
Refs: #1505
Change-Id: Ib154d91f81acf3f1dd8bbcf552062a16d03fec74
diff --git a/src/route/nexthop-list.cpp b/src/route/nexthop-list.cpp
index 12536f1..37f3480 100644
--- a/src/route/nexthop-list.cpp
+++ b/src/route/nexthop-list.cpp
@@ -1,9 +1,12 @@
#include <iostream>
#include "nexthop-list.hpp"
#include "nexthop.hpp"
+#include "logger.hpp"
namespace nlsr {
+INIT_LOGGER("NexthopList");
+
using namespace std;
static bool
@@ -69,6 +72,17 @@
m_nexthopList.sort(nextHopSortingComparator);
}
+void
+NexthopList::writeLog()
+{
+ int i = 1;
+ for (std::list<NextHop>::iterator it = m_nexthopList.begin();
+ it != m_nexthopList.end() ; it++, i++) {
+ _LOG_DEBUG("Nexthop " << i << ": " << (*it).getConnectingFaceUri()
+ << " Route Cost: " << (*it).getRouteCost());
+ }
+}
+
ostream&
operator<<(ostream& os, NexthopList& nhl)
{