src: Adding log4cxx logging

Refs: #1505

Change-Id: Ib154d91f81acf3f1dd8bbcf552062a16d03fec74
diff --git a/src/name-prefix-list.cpp b/src/name-prefix-list.cpp
index f00d0d0..c6d1bd7 100644
--- a/src/name-prefix-list.cpp
+++ b/src/name-prefix-list.cpp
@@ -4,9 +4,12 @@
 #include <ndn-cxx/common.hpp>
 
 #include "name-prefix-list.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("NamePrefixList");
+
 using namespace std;
 
 NamePrefixList::NamePrefixList()
@@ -57,6 +60,18 @@
 }
 
 void
+NamePrefixList::writeLog()
+{
+  _LOG_DEBUG("-------Name Prefix List--------");
+  int i = 1;
+  for (std::list<ndn::Name>::iterator it = m_nameList.begin();
+       it != m_nameList.end(); it++) {
+    _LOG_DEBUG("Name " << i << " : " << (*it));
+    i++;
+  }
+}
+
+void
 NamePrefixList::print()
 {
   int i = 1;