src: Adding log4cxx logging
Refs: #1505
Change-Id: Ib154d91f81acf3f1dd8bbcf552062a16d03fec74
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index 61b2722..a8071bc 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -6,11 +6,12 @@
#include "name-prefix-table.hpp"
#include "name-prefix-table-entry.hpp"
#include "routing-table.hpp"
-
-
+#include "logger.hpp"
namespace nlsr {
+INIT_LOGGER("NamePrefixTable");
+
using namespace std;
static bool
@@ -131,6 +132,17 @@
}
void
+NamePrefixTable::writeLog()
+{
+ _LOG_DEBUG("----------------NPT----------------------");
+ for (std::list<NamePrefixTableEntry>::iterator it = m_table.begin();
+ it != m_table.end();
+ ++it) {
+ (*it).writeLog();
+ }
+}
+
+void
NamePrefixTable::print()
{
std::cout << "----------------NPT----------------------" << std::endl;