diff --git a/nlsr.conf b/nlsr.conf
index 2f2440f..b3eacb6 100644
--- a/nlsr.conf
+++ b/nlsr.conf
@@ -14,7 +14,9 @@
 
 ; log-level is to set the levels of log for NLSR
 
-    log-level  INFO            ; default value INFO, valid value DEBUG, INFO
+    log-level  INFO       ; default value INFO, valid value DEBUG, INFO
+    log-dir /var/log/nlsr/  ; path for log directory (Absolute path)
+    seq-dir /var/lib/nlsr/  ; path for sequence directory (Absolute path)
 }
 
 ; the neighbors section contains the configuration for router's neighbors and hello's behavior
diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index 48e35cf..17f6537 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -4,10 +4,12 @@
 #include "adjacency-list.hpp"
 #include "adjacent.hpp"
 #include "nlsr.hpp"
-
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("AdjacencyList");
+
 using namespace std;
 
 AdjacencyList::AdjacencyList()
@@ -210,6 +212,16 @@
   return it;
 }
 
+void
+AdjacencyList::writeLog()
+{
+  _LOG_DEBUG("-------Adjacency List--------");
+  for (std::list<Adjacent>::iterator it = m_adjList.begin();
+       it != m_adjList.end(); it++) {
+    (*it).writeLog();
+  }
+}
+
 // used for debugging purpose
 void
 AdjacencyList::print()
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index 95600cc..a367122 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -79,6 +79,9 @@
   void
   print();
 
+  void
+  writeLog();
+
 private:
   std::list<Adjacent>::iterator
   find(const ndn::Name& adjName);
diff --git a/src/adjacent.cpp b/src/adjacent.cpp
index f27c4b8..35f9790 100644
--- a/src/adjacent.cpp
+++ b/src/adjacent.cpp
@@ -5,9 +5,12 @@
 
 
 #include "adjacent.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("Adjacent");
+
 using namespace std;
 
 const float Adjacent::DEFAULT_LINK_COST = 10.0;
@@ -55,6 +58,16 @@
   return m_name == adjacencyName;
 }
 
+void
+Adjacent::writeLog()
+{
+  _LOG_DEBUG("Adjacent : " << m_name);
+  _LOG_DEBUG("Connecting FaceUri: " << m_connectingFaceUri);
+  _LOG_DEBUG("Link Cost: " << m_linkCost);
+  _LOG_DEBUG("Status: " << m_status);
+  _LOG_DEBUG("Interest Timed out: " << m_interestTimedOutNo);
+}
+
 std::ostream&
 operator<<(std::ostream& os, const Adjacent& adj)
 {
diff --git a/src/adjacent.hpp b/src/adjacent.hpp
index cbfb0fa..5b14394 100644
--- a/src/adjacent.hpp
+++ b/src/adjacent.hpp
@@ -89,6 +89,9 @@
   bool
   compare(const ndn::Name& adjacencyName);
 
+  void
+  writeLog();
+
 public:
   static const float DEFAULT_LINK_COST;
 
diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index 85b1da0..f4a42a2 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -2,16 +2,19 @@
 #include "sync-logic-handler.hpp"
 #include "utility/name-helper.hpp"
 #include "lsa.hpp"
-
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("SyncLogicHandler");
+
 using namespace ndn;
 using namespace std;
 
 void
 SyncLogicHandler::createSyncSocket(Nlsr& pnlsr)
 {
+  _LOG_DEBUG("Creating Sync socket. Sync Prefix: " << m_syncPrefix);
   std::cout << "Creating Sync socket ......" << std::endl;
   std::cout << "Sync prefix: " << m_syncPrefix << std::endl;
   m_syncSocket = ndn::make_shared<Sync::SyncSocket>(m_syncPrefix, m_validator,
@@ -26,9 +29,11 @@
 SyncLogicHandler::nsyncUpdateCallBack(const vector<Sync::MissingDataInfo>& v,
                                       Sync::SyncSocket* socket, Nlsr& pnlsr)
 {
+  _LOG_DEBUG("nsyncUpdateCallBack called ....");
   std::cout << "nsyncUpdateCallBack called ...." << std::endl;
   int32_t n = v.size();
   for (int32_t i = 0; i < n; i++){
+    _LOG_DEBUG("Data Name: " << v[i].prefix << " Seq: " << v[i].high.getSeq());
     std::cout << "Data Name: " << v[i].prefix << " Seq: " << v[i].high.getSeq() <<
               endl;
     processUpdateFromSync(v[i].prefix, v[i].high.getSeq(), pnlsr);
@@ -38,6 +43,7 @@
 void
 SyncLogicHandler::nsyncRemoveCallBack(const string& prefix, Nlsr& pnlsr)
 {
+  _LOG_DEBUG("nsyncRemoveCallBack called ....");
   std::cout << "nsyncRemoveCallBack called ...." << std::endl;
 }
 
@@ -67,10 +73,11 @@
   if (routerName != pnlsr.getConfParameter().getRouterPrefix()) {
     SequencingManager sm(seqNo);
     std::cout << sm;
-    std::cout << "Router Name: " << routerName << endl;
+    //std::cout << "Router Name: " << routerName << endl;
     try {
       if (pnlsr.getLsdb().isNameLsaNew(rName.append("name"), sm.getNameLsaSeq())) {
         std::cout << "Updated Name LSA. Need to fetch it" << std::endl;
+        _LOG_DEBUG("Updated Name LSA. Need to fetch it");
         ndn::Name interestName(pnlsr.getConfParameter().getLsaPrefix());
         interestName.append(routerName);
         interestName.append("name");
@@ -81,6 +88,7 @@
       if (pnlsr.getLsdb().isAdjLsaNew(rName.append("adjacency"),
                                       sm.getAdjLsaSeq())) {
         std::cout << "Updated Adj LSA. Need to fetch it" << std::endl;
+        _LOG_DEBUG("Updated Adj LSA. Need to fetch it");
         ndn::Name interestName(pnlsr.getConfParameter().getLsaPrefix());
         interestName.append(routerName);
         interestName.append("adjacency");
@@ -91,6 +99,7 @@
       if (pnlsr.getLsdb().isCoordinateLsaNew(rName.append("coordinate"),
                                              sm.getCorLsaSeq())) {
         std::cout << "Updated Cor LSA. Need to fetch it" << std::endl;
+        _LOG_DEBUG("Updated Cor LSA. Need to fetch it");
         ndn::Name interestName(pnlsr.getConfParameter().getLsaPrefix());
         interestName.append(routerName);
         interestName.append("coordinate");
@@ -121,6 +130,7 @@
   std::cout << "Publishing Sync Update ......" << std::endl;
   std::cout << "Update in prefix: " << updatePrefix << std::endl;
   std::cout << "Seq No: " << seqNo << std::endl;
+  _LOG_DEBUG("Publishing Sync Update. Prefix: " << updatePrefix << "Seq no: " << seqNo);
   ndn::Name updateName(updatePrefix);
   string data("NoData");
   m_syncSocket->publishData(updateName.toUri(), 0, data.c_str(), data.size(),
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 7726869..b42bf80 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -3,6 +3,7 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/property_tree/info_parser.hpp>
 #include <boost/property_tree/ptree.hpp>
+#include <boost/filesystem.hpp>
 
 #include <ndn-cxx/name.hpp>
 
@@ -163,6 +164,72 @@
     return false;
   }
   
+  try {
+    std::string logDir = SectionAttributeTree.get<string>("log-dir");
+    if (boost::filesystem::exists(logDir)) {
+      if (boost::filesystem::is_directory(logDir)) {
+        std::string testFileName=logDir+"/test.log";
+        ofstream testOutFile;
+        testOutFile.open(testFileName.c_str());
+        if (testOutFile.is_open() && testOutFile.good()) {
+          m_nlsr.getConfParameter().setLogDir(logDir);
+        }
+        else {
+          std::cerr << "User does not have read and write permission on the directory";
+          std::cerr << std::endl;
+          return false;
+        }
+        testOutFile.close();
+        remove(testFileName.c_str());
+      }
+      else {
+        std::cerr << "Provided path is not a directory" << std::endl;
+        return false;
+      }
+    }
+    else {
+      std::cerr << "Log directory provided does not exists" << std::endl;
+      return false;
+    }
+  }
+  catch (const std::exception& ex) {
+    std::cerr << "You must configure log directory" << std::endl;
+    std::cerr << ex.what() << std::endl;
+    return false;
+  }
+  try {
+    std::string seqDir = SectionAttributeTree.get<string>("seq-dir");
+    if (boost::filesystem::exists(seqDir)) {
+      if (boost::filesystem::is_directory(seqDir)) {
+        std::string testFileName=seqDir+"/test.seq";
+        ofstream testOutFile;
+        testOutFile.open(testFileName.c_str());
+        if (testOutFile.is_open() && testOutFile.good()) {
+          m_nlsr.getConfParameter().setSeqFileDir(seqDir);
+        }
+        else {
+          std::cerr << "User does not have read and write permission on the directory";
+          std::cerr << std::endl;
+          return false;
+        }
+        testOutFile.close();
+        remove(testFileName.c_str());
+      }
+      else {
+        std::cerr << "Provided path is not a directory" << std::endl;
+        return false;
+      }
+    }
+    else {
+      std::cerr << "Seq directory provided does not exists" << std::endl;
+      return false;
+    }
+  }
+  catch (const std::exception& ex) {
+    std::cerr << "You must configure sequence directory" << std::endl;
+    std::cerr << ex.what() << std::endl;
+    return false;
+  }
   return true;
 }
 
@@ -233,7 +300,7 @@
           m_nlsr.getAdjacencyList().insert(adj);
         }
         else {
-          cerr << " Wrong command format ! [name /nbr/name/ \n face-uri /uri\n]";
+          std::cerr << " Wrong command format ! [name /nbr/name/ \n face-uri /uri\n]";
           std::cerr << " or bad URI format" << std::endl;
         }
       }
@@ -336,8 +403,7 @@
          m_nlsr.getNamePrefixList().insert(namePrefix);
        }
        else {
-         std::cerr << " Wrong command format ! [prefix /name/prefix] or bad URI";
-         std::cerr << std::endl;
+         std::cerr << " Wrong command format ! [prefix /name/prefix] or bad URI" << std::endl;
          return false;
        }
      }
diff --git a/src/conf-parameter.cpp b/src/conf-parameter.cpp
new file mode 100644
index 0000000..7160a69
--- /dev/null
+++ b/src/conf-parameter.cpp
@@ -0,0 +1,29 @@
+#include "conf-parameter.hpp"
+#include "logger.hpp"
+
+namespace nlsr {
+
+INIT_LOGGER("ConfParameter");
+
+void
+ConfParameter::writeLog()
+{
+  _LOG_DEBUG("Router Name: " << m_routerName);
+  _LOG_DEBUG("Site Name: " << m_siteName);
+  _LOG_DEBUG("Network: " << m_network);
+  _LOG_DEBUG("Router Prefix: " << m_routerPrefix);
+  _LOG_DEBUG("ChronoSync sync Prifex: " << m_chronosyncPrefix);
+  _LOG_DEBUG("ChronoSync LSA prefix: " << m_lsaPrefix);
+  _LOG_DEBUG("Interest Retry number: " << m_interestRetryNumber);
+  _LOG_DEBUG("Interest Resend second: " << m_interestResendTime);
+  _LOG_DEBUG("Info Interest Interval: " << m_infoInterestInterval);
+  _LOG_DEBUG("LSA refresh time: " << m_lsaRefreshTime);
+  _LOG_DEBUG("Max Faces Per Prefix: " << m_maxFacesPerPrefix);
+  _LOG_DEBUG("Hyperbolic ROuting: " << m_hyperbolicState);
+  _LOG_DEBUG("Hyp R: " << m_corR);
+  _LOG_DEBUG("Hyp theta: " << m_corTheta);
+  _LOG_DEBUG("Log Directory: " << m_logDir);
+  _LOG_DEBUG("Seq Directory: " << m_seqFileDir);
+}
+
+} // namespace nlsr
diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp
index 6f1dc86..0945a65 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -6,6 +6,8 @@
 #include <ndn-cxx/common.hpp>
 #include <ndn-cxx/face.hpp>
 
+#include "logger.hpp"
+
 namespace nlsr {
 
 enum {
@@ -256,6 +258,18 @@
   }
 
   void
+  setLogDir(const std::string& logDir)
+  {
+    m_logDir = logDir;
+  }
+
+  const std::string&
+  getLogDir()
+  {
+    return m_logDir;
+  }
+
+  void
   setSeqFileDir(const std::string& ssfd)
   {
     m_seqFileDir = ssfd;
@@ -267,6 +281,8 @@
     return m_seqFileDir;
   }
 
+  void
+  writeLog();
 
 private:
   ndn::Name m_routerName;
@@ -295,6 +311,7 @@
 
   int32_t m_maxFacesPerPrefix;
   
+  std::string m_logDir;
   std::string m_seqFileDir;
 
 };
@@ -302,20 +319,22 @@
 inline std::ostream&
 operator<<(std::ostream& os, ConfParameter& cfp)
 {
-  os  << "Router Name: " << cfp.getRouterName() << std::endl;
-  os  << "Site Name: " << cfp.getSiteName() << std::endl;
-  os  << "Network: " << cfp.getNetwork() << std::endl;
-  os  << "Router Prefix: " << cfp.getRouterPrefix() << std::endl;
-  os  << "ChronoSync sync Prifex: " << cfp.getChronosyncPrefix() << std::endl;
-  os  << "ChronoSync LSA prefix: " << cfp.getLsaPrefix() << std::endl;
-  os  << "Interest Retry number: " << cfp.getInterestRetryNumber() << std::endl;
-  os  << "Interest Resend second: " << cfp.getInterestResendTime() << std::endl;
-  os  << "Info Interest Interval: " << cfp.getInfoInterestInterval() << std::endl;
-  os  << "LSA refresh time: " << cfp.getLsaRefreshTime() << std::endl;
-  os  << "Max Faces Per Prefix: " << cfp.getMaxFacesPerPrefix() << std::endl;
-  os  << "Hyperbolic ROuting: " << cfp.getHyperbolicState() << std::endl;
-  os  << "Hyp R: " << cfp.getCorR() << std::endl;
-  os  << "Hyp theta: " << cfp.getCorTheta() << std::endl;
+  os << "Router Name: " << cfp.getRouterName() << std::endl;
+  os << "Site Name: " << cfp.getSiteName() << std::endl;
+  os << "Network: " << cfp.getNetwork() << std::endl;
+  os << "Router Prefix: " << cfp.getRouterPrefix() << std::endl;
+  os << "ChronoSync sync Prifex: " << cfp.getChronosyncPrefix() << std::endl;
+  os << "ChronoSync LSA prefix: " << cfp.getLsaPrefix() << std::endl;
+  os << "Interest Retry number: " << cfp.getInterestRetryNumber() << std::endl;
+  os << "Interest Resend second: " << cfp.getInterestResendTime() << std::endl;
+  os << "Info Interest Interval: " << cfp.getInfoInterestInterval() << std::endl;
+  os << "LSA refresh time: " << cfp.getLsaRefreshTime() << std::endl;
+  os << "Max Faces Per Prefix: " << cfp.getMaxFacesPerPrefix() << std::endl;
+  os << "Hyperbolic ROuting: " << cfp.getHyperbolicState() << std::endl;
+  os << "Hyp R: " << cfp.getCorR() << std::endl;
+  os << "Hyp theta: " << cfp.getCorTheta() << std::endl;
+  os << "Log Directory: " << cfp.getLogDir() << std::endl;
+  os << "Seq Directory: " << cfp.getSeqFileDir() << std::endl;
   return  os;
 }
 
diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index 2dc106c..217f7df 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -2,15 +2,19 @@
 #include "lsdb.hpp"
 #include "hello-protocol.hpp"
 #include "utility/name-helper.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("HelloProtocol");
+
 const std::string HelloProtocol::INFO_COMPONENT="info";
 
 void
 HelloProtocol::expressInterest(const ndn::Name& interestName, uint32_t seconds)
 {
   std::cout << "Expressing Interest :" << interestName << std::endl;
+  _LOG_DEBUG("Expressing Interest :" << interestName);
   ndn::Interest i(interestName);
   i.setInterestLifetime(ndn::time::seconds(seconds));
   i.setMustBeFresh(true);
@@ -51,12 +55,14 @@
 {
   const ndn::Name interestName = interest.getName();
   std::cout << "Interest Received for Name: " << interestName << std::endl;
+  _LOG_DEBUG("Interest Received for Name: " << interestName);
   if (interestName.get(-2).toUri() != INFO_COMPONENT) {
     return;
   }
   ndn::Name neighbor;
   neighbor.wireDecode(interestName.get(-1).blockFromValue());
   std::cout << "Neighbor: " << neighbor << std::endl;
+  _LOG_DEBUG("Neighbor: " << neighbor);
   if (m_nlsr.getAdjacencyList().isNeighbor(neighbor)) {
     ndn::Data data(ndn::Name(interest.getName()).appendVersion());
     data.setFreshnessPeriod(ndn::time::seconds(10)); // 10 sec
@@ -64,6 +70,7 @@
                     INFO_COMPONENT.size());
     m_keyChain.sign(data);
     std::cout << ">> D: " << data << std::endl;
+    _LOG_DEBUG("Sending out data for name: " << data.getName());
     m_nlsr.getNlsrFace().put(data);
     int status = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
     if (status == 0) {
@@ -81,11 +88,13 @@
 {
   const ndn::Name interestName(interest.getName());
   std::cout << "Interest timed out for Name: " << interestName << std::endl;
+  _LOG_DEBUG("Interest timed out for Name: " << interestName);
   if (interestName.get(-2).toUri() != INFO_COMPONENT) {
     return;
   }
   ndn::Name neighbor = interestName.getPrefix(-2);
   std::cout << "Neighbor: " << neighbor << std::endl;
+  _LOG_DEBUG("Neighbor: " << neighbor);
   m_nlsr.getAdjacencyList().incrementTimedOutInterestCount(neighbor);
   int status = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
   uint32_t infoIntTimedOutCount =
@@ -93,6 +102,8 @@
   std::cout << "Neighbor: " << neighbor << std::endl;
   std::cout << "Status: " << status << std::endl;
   std::cout << "Info Interest Timed out: " << infoIntTimedOutCount << std::endl;
+  _LOG_DEBUG("Status: " << status);
+  _LOG_DEBUG("Info Interest Timed out: " << infoIntTimedOutCount);
   if ((infoIntTimedOutCount < m_nlsr.getConfParameter().getInterestRetryNumber())) {
     ndn::Name interestName(neighbor);
     interestName.append(INFO_COMPONENT);
@@ -105,6 +116,7 @@
     m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, 0);
     m_nlsr.incrementAdjBuildCount();
     if (m_nlsr.getIsBuildAdjLsaSheduled() == false) {
+      _LOG_DEBUG("Scheduling scheduledAdjLsaBuild");
       m_nlsr.setIsBuildAdjLsaSheduled(true);
       // event here
       m_nlsr.getScheduler().scheduleEvent(ndn::time::seconds(5),
@@ -121,6 +133,7 @@
 {
   ndn::Name dataName = data.getName();
   std::cout << "Data received for name: " << dataName << std::endl;
+  _LOG_DEBUG("Data received for name: " << dataName);
   if (dataName.get(-3).toUri() == INFO_COMPONENT) {
     ndn::Name neighbor = dataName.getPrefix(-3);
     int oldStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
@@ -142,12 +155,14 @@
     std::cout << "Neighbor : " << neighbor << std::endl;
     std::cout << "Status: " << newStatus << std::endl;
     std::cout << "Info Interest Timed out: " << infoIntTimedOutCount << std::endl;
+    _LOG_DEBUG("Old Status: " << oldStatus << " New Status: " << newStatus);
     //debugging purpose end
     // change in Adjacency list
     if ((oldStatus - newStatus) != 0) {
       m_nlsr.incrementAdjBuildCount();
       /* Need to schedule event for Adjacency LSA building */
       if (m_nlsr.getIsBuildAdjLsaSheduled() == false) {
+        _LOG_DEBUG("Scheduling scheduledAdjLsaBuild");
         m_nlsr.setIsBuildAdjLsaSheduled(true);
         // event here
         m_nlsr.getScheduler().scheduleEvent(ndn::time::seconds(5),
diff --git a/src/logger.cpp b/src/logger.cpp
new file mode 100644
index 0000000..c4a2f11
--- /dev/null
+++ b/src/logger.cpp
@@ -0,0 +1,28 @@
+#include <log4cxx/logger.h>
+#include <log4cxx/basicconfigurator.h>
+#include <log4cxx/patternlayout.h>
+#include <log4cxx/level.h>
+#include <log4cxx/helpers/exception.h>
+#include <log4cxx/rollingfileappender.h>
+
+#include "logger.hpp"
+
+void
+INIT_LOGGERS(const std::string& logDir)
+{
+  static bool configured = false;
+  if (configured) return;
+
+  log4cxx::PatternLayoutPtr
+           layout(new log4cxx::PatternLayout("%date{yyyyMMddHHmmssSSS} %c %L: %m%n"));
+  log4cxx::RollingFileAppender* rollingFileAppender =
+           new log4cxx::RollingFileAppender(layout, logDir+"/nlsr.log", true);
+  rollingFileAppender->setMaxFileSize("10MB");
+  rollingFileAppender->setMaxBackupIndex(10);
+  log4cxx::helpers::Pool p;
+  rollingFileAppender->activateOptions(p);
+  log4cxx::BasicConfigurator::configure(log4cxx::AppenderPtr(rollingFileAppender));
+  log4cxx::Logger::getRootLogger()->setLevel(log4cxx::Level::getDebug());
+
+  configured = true;
+}
diff --git a/src/logger.hpp b/src/logger.hpp
new file mode 100644
index 0000000..241b732
--- /dev/null
+++ b/src/logger.hpp
@@ -0,0 +1,19 @@
+#ifndef NLSR_LOGGER_HPP
+#define NLSR_LOGGER_HPP
+
+#include <log4cxx/logger.h>
+
+
+#define INIT_LOGGER(name) \
+  static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger(name)
+
+#define _LOG_DEBUG(x) \
+  LOG4CXX_DEBUG(staticModuleLogger,x)
+
+#define _LOG_INFO(x) \
+  LOG4CXX_INFO(staticModuleLogger, x)
+
+void
+INIT_LOGGERS(const std::string& logDir);
+
+#endif // NLSR_LOGGER_HPP
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 14d033a..dbb6ee5 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -11,10 +11,13 @@
 #include "lsa.hpp"
 #include "name-prefix-list.hpp"
 #include "adjacent.hpp"
+#include "logger.hpp"
 
 
 namespace nlsr {
 
+INIT_LOGGER("Lsa");
+
 using namespace std;
 
 const ndn::Name
@@ -87,6 +90,18 @@
 void
 NameLsa::writeLog()
 {
+  _LOG_DEBUG("Name Lsa: ");
+  _LOG_DEBUG("  Origination Router: " << m_origRouter);
+  _LOG_DEBUG("  Ls Type: " << m_lsType);
+  _LOG_DEBUG("  Ls Seq No: " << m_lsSeqNo);
+  _LOG_DEBUG("  Ls Lifetime: " << m_lifeTime);
+  _LOG_DEBUG("  Names: ");
+  int i = 1;
+  std::list<ndn::Name> nl = m_npl.getNameList();
+  for (std::list<ndn::Name>::iterator it = nl.begin(); it != nl.end(); it++)
+  {
+    _LOG_DEBUG("    Name " << i << ": " << (*it));
+  }
 }
 
 std::ostream&
@@ -177,6 +192,18 @@
   return true;
 }
 
+void
+CoordinateLsa::writeLog()
+{
+  _LOG_DEBUG("Cor Lsa: ");
+  _LOG_DEBUG("  Origination Router: " << m_origRouter);
+  _LOG_DEBUG("  Ls Type: " << m_lsType);
+  _LOG_DEBUG("  Ls Seq No: " << m_lsSeqNo);
+  _LOG_DEBUG("  Ls Lifetime: " << m_lifeTime);
+  _LOG_DEBUG("    Hyperbolic Radius: " << m_corRad);
+  _LOG_DEBUG("    Hyperbolic Theta: " << m_corRad);
+}
+
 std::ostream&
 operator<<(std::ostream& os, const CoordinateLsa& cLsa)
 {
@@ -298,7 +325,25 @@
   }
 }
 
-
+void
+AdjLsa::writeLog()
+{
+  _LOG_DEBUG("Adj Lsa: ");
+  _LOG_DEBUG("  Origination Router: " << m_origRouter);
+  _LOG_DEBUG("  Ls Type: " << m_lsType);
+  _LOG_DEBUG("  Ls Seq No: " << m_lsSeqNo);
+  _LOG_DEBUG("  Ls Lifetime: " << m_lifeTime);
+  _LOG_DEBUG("  Adjacents: ");
+  int i = 1;
+  std::list<Adjacent> al = m_adl.getAdjList();
+  for (std::list<Adjacent>::iterator it = al.begin(); it != al.end(); it++)
+  {
+    _LOG_DEBUG("    Adjacent " << i << ": ");;
+    _LOG_DEBUG("      Adjacent Name: " << (*it).getName());
+    _LOG_DEBUG("      Connecting FaceUri: " << (*it).getConnectingFaceUri());
+    _LOG_DEBUG("      Link Cost: " << (*it).getLinkCost());
+  }
+}
 
 std::ostream&
 operator<<(std::ostream& os, AdjLsa& aLsa)
diff --git a/src/lsa.hpp b/src/lsa.hpp
index 041e32c..bc43772 100644
--- a/src/lsa.hpp
+++ b/src/lsa.hpp
@@ -190,6 +190,9 @@
   void
   removeNptEntries(Nlsr& pnlsr);
 
+  void
+  writeLog();
+
 private:
   uint32_t m_noLink;
   AdjacencyList m_adl;
@@ -249,6 +252,9 @@
   bool
   isEqualContent(const CoordinateLsa& clsa);
 
+  void
+  writeLog();
+
 private:
   double m_corRad;
   double m_corTheta;
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 0b34867..f99482d 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -5,9 +5,12 @@
 #include "nlsr.hpp"
 #include "conf-parameter.hpp"
 #include "utility/name-helper.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("Lsdb");
+
 using namespace std;
 
 void
@@ -77,7 +80,9 @@
   NameLsa* chkNameLsa = findNameLsa(nlsa.getKey());
   if (chkNameLsa == 0) {
     addNameLsa(nlsa);
+    _LOG_DEBUG("New Name LSA. Adding to LSDB");
     nlsa.writeLog();
+
     printNameLsdb();
     if (nlsa.getOrigRouter() != m_nlsr.getConfParameter().getRouterPrefix()) {
       m_nlsr.getNamePrefixTable().addEntry(nlsa.getOrigRouter(),
@@ -99,6 +104,8 @@
   }
   else {
     if (chkNameLsa->getLsSeqNo() < nlsa.getLsSeqNo()) {
+      _LOG_DEBUG("Updated Name LSA. Updating LSDB");
+      _LOG_DEBUG("Old Name LSA ");
       chkNameLsa->writeLog();
       chkNameLsa->setLsSeqNo(nlsa.getLsSeqNo());
       chkNameLsa->setLifeTime(nlsa.getLifeTime());
@@ -141,6 +148,7 @@
       chkNameLsa->setExpiringEventId(scheduleNameLsaExpiration(nlsa.getKey(),
                                                                nlsa.getLsSeqNo(),
                                                                timeToExpire));
+      _LOG_DEBUG("Updated Name LSA");
       chkNameLsa->writeLog();
     }
   }
@@ -168,6 +176,7 @@
                                                  m_nameLsdb.end(),
                                                  ndn::bind(nameLsaCompareByKey, _1, key));
   if (it != m_nameLsdb.end()) {
+    _LOG_DEBUG("Removing Name LSA");
     (*it).writeLog();
     if ((*it).getOrigRouter() !=
         m_nlsr.getConfParameter().getRouterPrefix()) {
@@ -273,6 +282,8 @@
   int timeToExpire = m_lsaRefreshTime;
   CoordinateLsa* chkCorLsa = findCoordinateLsa(clsa.getKey());
   if (chkCorLsa == 0) {
+    _LOG_DEBUG("New Coordinate LSA. Adding to LSDB");
+    clsa.writeLog();
     addCoordinateLsa(clsa);
     //debugging purpose
     printCorLsdb();
@@ -291,6 +302,9 @@
   }
   else {
     if (chkCorLsa->getLsSeqNo() < clsa.getLsSeqNo()) {
+      _LOG_DEBUG("Updated Coordinate LSA. Updating LSDB");
+      _LOG_DEBUG("Old Coordinate LSA");
+      chkCorLsa->writeLog();
       chkCorLsa->setLsSeqNo(clsa.getLsSeqNo());
       chkCorLsa->setLifeTime(clsa.getLifeTime());
       if (!chkCorLsa->isEqualContent(clsa)) {
@@ -307,6 +321,8 @@
       chkCorLsa->setExpiringEventId(scheduleCoordinateLsaExpiration(clsa.getKey(),
                                                                     clsa.getLsSeqNo(),
                                                                     timeToExpire));
+      _LOG_DEBUG("Updated Coordinate LSA");
+      chkCorLsa->writeLog();
     }
   }
   return true;
@@ -334,6 +350,8 @@
                                                        ndn::bind(corLsaCompareByKey,
                                                                  _1, key));
   if (it != m_corLsdb.end()) {
+    _LOG_DEBUG("Removing Coordinate LSA");
+    (*it).writeLog();
     if ((*it).getOrigRouter() !=
         m_nlsr.getConfParameter().getRouterPrefix()) {
       m_nlsr.getNamePrefixTable().removeEntry((*it).getOrigRouter(),
@@ -382,12 +400,14 @@
 void
 Lsdb::scheduledAdjLsaBuild()
 {
-  cout << "scheduledAdjLsaBuild Called" << endl;
-  m_nlsr.setIsBuildAdjLsaSheduled(0);
+  std::cout << "scheduledAdjLsaBuild Called" << endl;
+  _LOG_DEBUG("scheduledAdjLsaBuild Called");
+  m_nlsr.setIsBuildAdjLsaSheduled(false);
   if (m_nlsr.getAdjacencyList().isAdjLsaBuildable(m_nlsr)) {
     int adjBuildCount = m_nlsr.getAdjBuildCount();
     if (adjBuildCount > 0) {
       if (m_nlsr.getAdjacencyList().getNumOfActiveNeighbor() > 0) {
+        _LOG_DEBUG("Building and installing Adj LSA");
         buildAndInstallOwnAdjLsa();
       }
       else {
@@ -400,7 +420,7 @@
     }
   }
   else {
-    m_nlsr.setIsBuildAdjLsaSheduled(1);
+    m_nlsr.setIsBuildAdjLsaSheduled(true);
     int schedulingTime = m_nlsr.getConfParameter().getInterestRetryNumber() *
                          m_nlsr.getConfParameter().getInterestResendTime();
     m_nlsr.getScheduler().scheduleEvent(ndn::time::seconds(schedulingTime),
@@ -467,6 +487,8 @@
   int timeToExpire = m_lsaRefreshTime;
   AdjLsa* chkAdjLsa = findAdjLsa(alsa.getKey());
   if (chkAdjLsa == 0) {
+    _LOG_DEBUG("New Adj LSA. Adding to LSDB");
+    alsa.writeLog();
     addAdjLsa(alsa);
     alsa.addNptEntries(m_nlsr);
     m_nlsr.getRoutingTable().scheduleRoutingTableCalculation(m_nlsr);
@@ -478,6 +500,9 @@
   }
   else {
     if (chkAdjLsa->getLsSeqNo() < alsa.getLsSeqNo()) {
+      _LOG_DEBUG("Updated Adj LSA. Updating LSDB");
+      _LOG_DEBUG("Old Adj LSA");
+      chkAdjLsa->writeLog();
       chkAdjLsa->setLsSeqNo(alsa.getLsSeqNo());
       chkAdjLsa->setLifeTime(alsa.getLifeTime());
       if (!chkAdjLsa->isEqualContent(alsa)) {
@@ -492,6 +517,8 @@
       chkAdjLsa->setExpiringEventId(scheduleAdjLsaExpiration(alsa.getKey(),
                                                              alsa.getLsSeqNo(),
                                                              timeToExpire));
+      _LOG_DEBUG("Updated Adj LSA");
+      chkAdjLsa->writeLog();
     }
   }
   return true;
@@ -522,6 +549,8 @@
                                                 m_adjLsdb.end(),
                                                 ndn::bind(adjLsaCompareByKey, _1, key));
   if (it != m_adjLsdb.end()) {
+    _LOG_DEBUG("Removing Adj LSA");
+    (*it).writeLog();
     (*it).removeNptEntries(m_nlsr);
     m_adjLsdb.erase(it);
     return true;
@@ -562,15 +591,19 @@
 void
 Lsdb::exprireOrRefreshNameLsa(const ndn::Name& lsaKey, uint64_t seqNo)
 {
-  cout << "Lsdb::exprireOrRefreshNameLsa Called " << endl;
-  cout << "LSA Key : " << lsaKey << " Seq No: " << seqNo << endl;
+  std::cout << "Lsdb::exprireOrRefreshNameLsa Called " << std::endl;
+  std::cout << "LSA Key : " << lsaKey << " Seq No: " << seqNo << std::endl;
+  _LOG_DEBUG("Lsdb::exprireOrRefreshNameLsa Called");
+  _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
   NameLsa* chkNameLsa = findNameLsa(lsaKey);
   if (chkNameLsa != 0) {
-    cout << " LSA Exists with seq no: " << chkNameLsa->getLsSeqNo() << endl;
+    std::cout << "LSA Exists with seq no: " << chkNameLsa->getLsSeqNo() << std::endl;
+    _LOG_DEBUG("LSA Exists with seq no: " << chkNameLsa->getLsSeqNo());
     if (chkNameLsa->getLsSeqNo() == seqNo) {
       if (chkNameLsa->getOrigRouter() == m_thisRouterPrefix) {
         chkNameLsa->writeLog();
-        cout << "Own Name LSA, so refreshing name LSA" << endl;
+        std::cout << "Own Name LSA, so refreshing name LSA" << std::endl;
+        _LOG_DEBUG("Own Name LSA, so refreshing name LSA");
         chkNameLsa->setLsSeqNo(chkNameLsa->getLsSeqNo() + 1);
         m_nlsr.getSequencingManager().setNameLsaSeq(chkNameLsa->getLsSeqNo());
         chkNameLsa->writeLog();
@@ -585,7 +618,8 @@
                                                           lsaPrefix);
       }
       else {
-        cout << "Other's Name LSA, so removing form LSDB" << endl;
+        std::cout << "Other's Name LSA, so removing form LSDB" << std::endl;
+        _LOG_DEBUG("Other's Name LSA, so removing form LSDB");
         removeNameLsa(lsaKey);
       }
     }
@@ -597,12 +631,16 @@
 {
   cout << "Lsdb::exprireOrRefreshAdjLsa Called " << endl;
   cout << "LSA Key : " << lsaKey << " Seq No: " << seqNo << endl;
+  _LOG_DEBUG("Lsdb::exprireOrRefreshAdjLsa Called");
+  _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
   AdjLsa* chkAdjLsa = findAdjLsa(lsaKey);
   if (chkAdjLsa != 0) {
-    cout << " LSA Exists with seq no: " << chkAdjLsa->getLsSeqNo() << endl;
+    cout << "LSA Exists with seq no: " << chkAdjLsa->getLsSeqNo() << endl;
+    _LOG_DEBUG("LSA Exists with seq no: ");
     if (chkAdjLsa->getLsSeqNo() == seqNo) {
       if (chkAdjLsa->getOrigRouter() == m_thisRouterPrefix) {
         cout << "Own Adj LSA, so refreshing Adj LSA" << endl;
+        _LOG_DEBUG("Own Adj LSA, so refreshing Adj LSA");
         chkAdjLsa->setLsSeqNo(chkAdjLsa->getLsSeqNo() + 1);
         m_nlsr.getSequencingManager().setAdjLsaSeq(chkAdjLsa->getLsSeqNo());
         // schedule refreshing event again
@@ -617,6 +655,7 @@
       }
       else {
         cout << "Other's Adj LSA, so removing form LSDB" << endl;
+        _LOG_DEBUG("Other's Adj LSA, so removing form LSDB");
         removeAdjLsa(lsaKey);
       }
       // schedule Routing table calculaiton
@@ -631,12 +670,16 @@
 {
   cout << "Lsdb::exprireOrRefreshCorLsa Called " << endl;
   cout << "LSA Key : " << lsaKey << " Seq No: " << seqNo << endl;
+  _LOG_DEBUG("Lsdb::exprireOrRefreshCorLsa Called ");
+  _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
   CoordinateLsa* chkCorLsa = findCoordinateLsa(lsaKey);
   if (chkCorLsa != 0) {
     cout << " LSA Exists with seq no: " << chkCorLsa->getLsSeqNo() << endl;
+    _LOG_DEBUG("LSA Exists with seq no: " << chkCorLsa->getLsSeqNo());
     if (chkCorLsa->getLsSeqNo() == seqNo) {
       if (chkCorLsa->getOrigRouter() == m_thisRouterPrefix) {
         cout << "Own Cor LSA, so refreshing Cor LSA" << endl;
+        _LOG_DEBUG("Own Cor LSA, so refreshing Cor LSA");
         chkCorLsa->setLsSeqNo(chkCorLsa->getLsSeqNo() + 1);
         m_nlsr.getSequencingManager().setCorLsaSeq(chkCorLsa->getLsSeqNo());
         // schedule refreshing event again
@@ -652,6 +695,7 @@
       }
       else {
         cout << "Other's Cor LSA, so removing form LSDB" << endl;
+        _LOG_DEBUG("Other's Cor LSA, so removing form LSDB");
         removeCoordinateLsa(lsaKey);
       }
       if (m_nlsr.getConfParameter().getHyperbolicState() >= HYPERBOLIC_STATE_ON) {
@@ -666,6 +710,7 @@
 Lsdb::expressInterest(const ndn::Name& interestName, uint32_t interestLifeTime)
 {
   std::cout << "Expressing Interest :" << interestName << std::endl;
+  _LOG_DEBUG("Expressing Interest for LSA(name): " << interestName);
   ndn::Interest interest(interestName);
   interest.setInterestLifetime(ndn::time::seconds(interestLifeTime));
   interest.setMustBeFresh(true);
@@ -681,6 +726,7 @@
 {
   const ndn::Name& intName(interest.getName());
   std::cout << "Interest recevied for LSA: " << intName << std::endl;
+  _LOG_DEBUG("Interest recevied for LSA(name): " << intName);
   string chkString("LSA");
   int32_t lsaPosition = util::getNameComponentPosition(interest.getName(),
                                                        chkString);
@@ -728,12 +774,13 @@
   if (nameLsa != 0) {
     if (nameLsa->getLsSeqNo() >= interestedlsSeqNo) {
       ndn::Data data(ndn::Name(interest.getName()).appendVersion());
+      _LOG_DEBUG("Sending data for LSA(name): " << interest.getName());
       data.setFreshnessPeriod(ndn::time::seconds(10)); // 10 sec
       std::string content = nameLsa->getData();
       data.setContent(reinterpret_cast<const uint8_t*>(content.c_str()),
                       content.size());
       m_keyChain.sign(data);
-      std::cout << ">> D: " << data << std::endl;
+      //std::cout << ">> D: " << data << std::endl;
       m_nlsr.getNlsrFace().put(data);
     }
   }
@@ -748,12 +795,13 @@
   if (adjLsa != 0) {
     if (adjLsa->getLsSeqNo() >= interestedlsSeqNo) {
       ndn::Data data(ndn::Name(interest.getName()).appendVersion());
+      _LOG_DEBUG("Sending data for LSA(name): " << interest.getName());
       data.setFreshnessPeriod(ndn::time::seconds(10)); // 10 sec
       std::string content = adjLsa->getData();
       data.setContent(reinterpret_cast<const uint8_t*>(content.c_str()),
                       content.size());
       m_keyChain.sign(data);
-      std::cout << ">> D: " << data << std::endl;
+      //std::cout << ">> D: " << data << std::endl;
       m_nlsr.getNlsrFace().put(data);
     }
   }
@@ -768,12 +816,13 @@
   if (corLsa != 0) {
     if (corLsa->getLsSeqNo() >= interestedlsSeqNo) {
       ndn::Data data(ndn::Name(interest.getName()).appendVersion());
+      _LOG_DEBUG("Sending data for LSA(name): " << interest.getName());
       data.setFreshnessPeriod(ndn::time::seconds(10)); // 10 sec
       std::string content = corLsa->getData();
       data.setContent(reinterpret_cast<const uint8_t*>(content.c_str()),
                       content.size());
       m_keyChain.sign(data);
-      std::cout << ">> D: " << data << std::endl;
+      //std::cout << ">> D: " << data << std::endl;
       m_nlsr.getNlsrFace().put(data);
     }
   }
@@ -783,7 +832,8 @@
 Lsdb::processContent(const ndn::Interest& interest, const ndn::Data& data)
 {
   const ndn::Name& dataName = data.getName();
-  std::cout << "Data received for name: " << dataName << std::endl;
+  std::cout << "Data received for LSA(name): " << dataName << std::endl;
+  _LOG_DEBUG("Data received for LSA(name): " << dataName);
   string dataContent(reinterpret_cast<const char*>(data.getContent().value()));
   string chkString("LSA");
   int32_t lsaPosition = util::getNameComponentPosition(dataName, chkString);
@@ -867,7 +917,8 @@
 Lsdb::processInterestTimedOut(const ndn::Interest& interest)
 {
   const ndn::Name& interestName(interest.getName());
-  cout << "Interest timed out for Name: " << interestName << endl;
+  cout << "Interest timed out for LSA(name): " << interestName << endl;
+  _LOG_DEBUG("Interest timed out for  LSA(name): " << interestName);
 }
 
 
diff --git a/src/main.cpp b/src/main.cpp
index 9e3bf12..2054e56 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,6 +20,7 @@
 #include <boost/cstdint.hpp>
 #include "nlsr.hpp"
 #include "conf-file-processor.hpp"
+#include "logger.hpp"
 
 using namespace nlsr;
 
@@ -54,12 +55,13 @@
     }
   }
   ConfFileProcessor cfp(nlsr, nlsr.getConfFileName());
-  int32_t res = cfp.processConfFile();
-  if (res < 0) {
+  if(!cfp.processConfFile()) {
     std::cerr << "Error in configuration file processing! Exiting from NLSR" <<
               std::endl;
     return EXIT_FAILURE;
   }
+  INIT_LOGGERS(nlsr.getConfParameter().getLogDir());
+  INIT_LOGGER("Main");
   nlsr.initialize();
   try {
     nlsr.startEventLoop();
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;
diff --git a/src/name-prefix-list.hpp b/src/name-prefix-list.hpp
index 7b7eba1..08bd486 100644
--- a/src/name-prefix-list.hpp
+++ b/src/name-prefix-list.hpp
@@ -38,6 +38,9 @@
   }
 
   void
+  writeLog();
+
+  void
   print();
 
 private:
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index a55f634..613e800 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -5,10 +5,13 @@
 
 #include "nlsr.hpp"
 #include "adjacent.hpp"
+#include "logger.hpp"
 
 
 namespace nlsr {
 
+INIT_LOGGER("nlsr");
+
 using namespace ndn;
 using namespace std;
 
@@ -28,6 +31,7 @@
 Nlsr::setInfoInterestFilter()
 {
   ndn::Name name(m_confParam.getRouterPrefix());
+  _LOG_DEBUG("Setting interest filter for name: " << name);
   getNlsrFace().setInterestFilter(name,
                                   ndn::bind(&HelloProtocol::processInterest,
                                             &m_helloProtocol, _1, _2),
@@ -40,6 +44,7 @@
 {
   ndn::Name name = m_confParam.getLsaPrefix();
   name.append(m_confParam.getRouterPrefix());
+  _LOG_DEBUG("Setting interest filter for name: " << name);
   getNlsrFace().setInterestFilter(name,
                                   ndn::bind(&Lsdb::processInterest,
                                             &m_nlsrLsdb, _1, _2),
@@ -70,6 +75,7 @@
 void
 Nlsr::initialize()
 {
+  _LOG_DEBUG("Initializing Nlsr");
   m_confParam.buildRouterPrefix();
   m_nlsrLsdb.setLsaRefreshTime(m_confParam.getLsaRefreshTime());
   m_nlsrLsdb.setThisRouterPrefix(m_confParam.getRouterPrefix().toUri());
@@ -81,11 +87,16 @@
   m_adjacencyList.print();
   m_namePrefixList.print();
   /* debugging purpose end */
+  /* Logging start */
+  m_confParam.writeLog();
+  m_adjacencyList.writeLog();
+  m_namePrefixList.writeLog();
+  /* Logging end */
   registerPrefixes();
-  m_nlsrLsdb.buildAndInstallOwnNameLsa();
-  m_nlsrLsdb.buildAndInstallOwnCoordinateLsa();
   setInfoInterestFilter();
   setLsaInterestFilter();
+  m_nlsrLsdb.buildAndInstallOwnNameLsa();
+  m_nlsrLsdb.buildAndInstallOwnCoordinateLsa();
   m_syncLogicHandler.setSyncPrefix(m_confParam.getChronosyncPrefix().toUri());
   m_syncLogicHandler.createSyncSocket(boost::ref(*this));
   //m_interestManager.scheduleInfoInterest(10);
diff --git a/src/route/fib-entry.cpp b/src/route/fib-entry.cpp
index ba3d77a..ba2731f 100644
--- a/src/route/fib-entry.cpp
+++ b/src/route/fib-entry.cpp
@@ -1,9 +1,12 @@
 #include <list>
 #include "fib-entry.hpp"
 #include "nexthop.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("FibEntry");
+
 using namespace std;
 
 bool
@@ -30,6 +33,14 @@
   }
 }
 
+void
+FibEntry::writeLog()
+{
+  _LOG_DEBUG("Name Prefix: " << m_name);
+  _LOG_DEBUG("Seq No: " << m_seqNo);
+  m_nexthopList.writeLog();
+}
+
 ostream&
 operator<<(ostream& os, FibEntry fe)
 {
diff --git a/src/route/fib-entry.hpp b/src/route/fib-entry.hpp
index 71ecb04..14d3772 100644
--- a/src/route/fib-entry.hpp
+++ b/src/route/fib-entry.hpp
@@ -82,6 +82,9 @@
   bool
   isEqualNextHops(NexthopList& nhlOther);
 
+  void
+  writeLog();
+
 private:
   ndn::Name m_name;
   int32_t m_timeToRefresh;
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index a68d4d6..17269dc 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -6,12 +6,14 @@
 #include "nexthop-list.hpp"
 #include "face-map.hpp"
 #include "fib.hpp"
-
+#include "logger.hpp"
 
 
 
 namespace nlsr {
 
+INIT_LOGGER("Fib");
+
 using namespace std;
 using namespace ndn;
 
@@ -34,6 +36,8 @@
 {
   std::cout << "Fib::scheduleEntryRefreshing Called" << std::endl;
   std::cout << "Name: " << name << " Seq Num: " << feSeqNum << std::endl;
+  _LOG_DEBUG("Fib::scheduleEntryRefreshing Called");
+  _LOG_DEBUG("Name: " << name << " Seq Num: " << feSeqNum);
   return m_nlsr.getScheduler().scheduleEvent(ndn::time::seconds(refreshTime),
                                              ndn::bind(&Fib::refreshEntry, this,
                                                        name, feSeqNum));
@@ -51,6 +55,7 @@
     std::cout << "Entry found with Seq Num: " << feSeqNum << std::endl;
     if (it->getSeqNo() == feSeqNum) {
       std::cout << "Refreshing the FIB entry" << std::endl;
+      _LOG_DEBUG("Refreshing the FIB entry. Name: " <<  name);
       for (std::list<NextHop>::iterator nhit =
              (*it).getNexthopList().getNextHops().begin();
            nhit != (*it).getNexthopList().getNextHops().end(); nhit++) {
@@ -70,6 +75,7 @@
 void
 Fib::remove(const ndn::Name& name)
 {
+  _LOG_DEBUG("Fib::remove called");
   std::list<FibEntry>::iterator it = std::find_if(m_table.begin(),
                                                   m_table.end(),
                                                   bind(&fibEntryNameCompare, _1, name));
@@ -91,6 +97,7 @@
     }
     std::cout << "Cancellling Scheduled event" << std::endl;
     std::cout << "Name: " << name << "Seq num: " << it->getSeqNo() << std::endl;
+    _LOG_DEBUG("Cancelling Scheduled event. Name: " << name);
     cancelScheduledExpiringEvent((*it).getExpiringEventId());
     m_table.erase(it);
   }
@@ -101,6 +108,7 @@
 Fib::update(const ndn::Name& name, NexthopList& nextHopList)
 {
   std::cout << "Fib::updateFib Called" << std::endl;
+  _LOG_DEBUG("Fib::updateFib Called");
   int startFace = 0;
   int endFace = getNumberOfFacesForName(nextHopList,
                                         m_nlsr.getConfParameter().getMaxFacesPerPrefix());
@@ -151,6 +159,7 @@
       it->setTimeToRefresh(m_refreshTime);
       std::cout << "Cancellling Scheduled event" << std::endl;
       std::cout << "Name: " << name << "Seq num: " << it->getSeqNo() << std::endl;
+      _LOG_DEBUG("Cancelling Scheduled event. Name: " << name);
       cancelScheduledExpiringEvent(it->getExpiringEventId());
       it->setSeqNo(it->getSeqNo() + 1);
       (*it).setExpiringEventId(scheduleEntryRefreshing(it->getName() ,
@@ -167,11 +176,13 @@
 void
 Fib::clean()
 {
+  _LOG_DEBUG("Fib::clean called");
   for (std::list<FibEntry>::iterator it = m_table.begin(); it != m_table.end();
        ++it) {
     std::cout << "Cancellling Scheduled event" << std::endl;
     std::cout << "Name: " << it->getName() << "Seq num: " << it->getSeqNo() <<
               std::endl;
+    _LOG_DEBUG("Cancelling Scheduled event. Name: " << it->getName());
     cancelScheduledExpiringEvent((*it).getExpiringEventId());
     for (std::list<NextHop>::iterator nhit =
            (*it).getNexthopList().getNextHops().begin();
@@ -320,6 +331,15 @@
   std::cout << message << ": " << error << " (code: " << code << ")";
 }
 
+void
+Fib::writeLog()
+{
+  _LOG_DEBUG("-------------------FIB-----------------------------");
+  for (std::list<FibEntry>::iterator it = m_table.begin(); it != m_table.end();
+       ++it) {
+    (*it).writeLog();
+  }
+}
 
 void
 Fib::print()
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index 559df7a..d144e1f 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -76,6 +76,9 @@
   void
   setStrategy(const ndn::Name& name, const std::string& strategy);
 
+  void
+  writeLog();
+
 private:
   void
   unregisterPrefix(const ndn::Name& namePrefix, const std::string& faceUri);
diff --git a/src/route/name-prefix-table-entry.cpp b/src/route/name-prefix-table-entry.cpp
index cb7b869..9a734f7 100644
--- a/src/route/name-prefix-table-entry.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -3,9 +3,12 @@
 #include "name-prefix-table-entry.hpp"
 #include "routing-table-entry.hpp"
 #include "nexthop.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("NamePrefixTableEntry");
+
 using namespace std;
 
 void
@@ -65,6 +68,19 @@
   }
 }
 
+void
+NamePrefixTableEntry::writeLog()
+{
+  _LOG_DEBUG("Name: " << m_namePrefix);
+  for (std::list<RoutingTableEntry>::iterator it = m_rteList.begin();
+       it != m_rteList.end(); ++it) {
+    _LOG_DEBUG("Destination: " << (*it).getDestination());
+    _LOG_DEBUG("Nexthops: ");
+    (*it).getNexthopList().writeLog();
+  }
+  m_nexthopList.writeLog();
+}
+
 //debugging purpose
 ostream&
 operator<<(ostream& os, NamePrefixTableEntry& npte)
diff --git a/src/route/name-prefix-table-entry.hpp b/src/route/name-prefix-table-entry.hpp
index 13a31ea..b42d396 100644
--- a/src/route/name-prefix-table-entry.hpp
+++ b/src/route/name-prefix-table-entry.hpp
@@ -66,6 +66,9 @@
   void
   addRoutingTableEntry(RoutingTableEntry& rte);
 
+  void
+  writeLog();
+
 private:
   ndn::Name m_namePrefix;
   std::list<RoutingTableEntry> m_rteList;
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;
diff --git a/src/route/name-prefix-table.hpp b/src/route/name-prefix-table.hpp
index b872161..532410f 100644
--- a/src/route/name-prefix-table.hpp
+++ b/src/route/name-prefix-table.hpp
@@ -28,6 +28,9 @@
   updateWithNewRoute();
 
   void
+  writeLog();
+
+  void
   print();
 
 private:
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)
 {
diff --git a/src/route/nexthop-list.hpp b/src/route/nexthop-list.hpp
index 2607218..8e7843d 100644
--- a/src/route/nexthop-list.hpp
+++ b/src/route/nexthop-list.hpp
@@ -50,6 +50,9 @@
     return m_nexthopList;
   }
 
+  void
+  writeLog();
+
 private:
   std::list<NextHop> m_nexthopList;
 };
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index bcfb61c..21ac00c 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -9,9 +9,12 @@
 #include "routing-table-calculator.hpp"
 #include "routing-table-entry.hpp"
 #include "name-prefix-table.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("RoutingTable");
+
 using namespace std;
 
 void
@@ -22,6 +25,7 @@
   pnlsr.getLsdb().printAdjLsdb();
   pnlsr.getLsdb().printCorLsdb();
   pnlsr.getLsdb().printNameLsdb();
+  pnlsr.getNamePrefixTable().writeLog();
   if (pnlsr.getIsRoutingTableCalculating() == false) {
     //setting routing table calculation
     pnlsr.setIsRoutingTableCalculating(true);
@@ -30,6 +34,7 @@
           std::string("adjacency"))) {
       if (pnlsr.getIsBuildAdjLsaSheduled() != 1) {
         std::cout << "CLearing old routing table ....." << std::endl;
+        _LOG_DEBUG("CLearing old routing table .....");
         clearRoutingTable();
         // for dry run options
         clearDryRoutingTable();
@@ -52,16 +57,23 @@
         printRoutingTable();
         pnlsr.getNamePrefixTable().print();
         pnlsr.getFib().print();
+        writeLog();
+        pnlsr.getNamePrefixTable().writeLog();
+        pnlsr.getFib().writeLog();
         //debugging purpose end
       }
       else {
         std::cout << "Adjacency building is scheduled, so ";
         std::cout << "routing table can not be calculated :(" << std::endl;
+        _LOG_DEBUG("Adjacency building is scheduled, so"
+                   " routing table can not be calculated :(");
       }
     }
     else {
       std::cout << "No Adj LSA of router itself,";
       std::cout <<	" so Routing table can not be calculated :(" << std::endl;
+      _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
@@ -71,6 +83,9 @@
       printRoutingTable();
       pnlsr.getNamePrefixTable().print();
       pnlsr.getFib().print();
+      writeLog();
+      pnlsr.getNamePrefixTable().writeLog();
+      pnlsr.getFib().writeLog();
       //debugging purpose end
     }
     pnlsr.setIsRouteCalculationScheduled(false); //clear scheduled flag
@@ -159,6 +174,18 @@
 }
 
 void
+RoutingTable::writeLog()
+{
+  _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: ");
+    (*it).getNexthopList().writeLog();
+  }
+}
+
+void
 RoutingTable::printRoutingTable()
 {
   std::cout << "---------------Routing Table------------------" << std::endl;
diff --git a/src/route/routing-table.hpp b/src/route/routing-table.hpp
index 983596b..0117a6a 100644
--- a/src/route/routing-table.hpp
+++ b/src/route/routing-table.hpp
@@ -63,6 +63,9 @@
   void
   clearDryRoutingTable();
 
+  void
+  writeLog();
+
   const int m_NO_NEXT_HOP;
 
   std::list<RoutingTableEntry> m_rTable;
diff --git a/src/sequencing-manager.cpp b/src/sequencing-manager.cpp
index 3d63a3d..dbf943f 100644
--- a/src/sequencing-manager.cpp
+++ b/src/sequencing-manager.cpp
@@ -6,9 +6,12 @@
 #include <unistd.h>
 
 #include "sequencing-manager.hpp"
+#include "logger.hpp"
 
 namespace nlsr {
 
+INIT_LOGGER("SequencingManager");
+
 using namespace std;
 
 void
diff --git a/wscript b/wscript
index 909a2df..c0e3934 100644
--- a/wscript
+++ b/wscript
@@ -46,7 +46,10 @@
     conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
                    uselib_store='NDN_CPP', mandatory=True)
 
-    boost_libs = 'system chrono program_options iostreams thread regex'
+    conf.check_cfg(package='liblog4cxx', args=['--cflags', '--libs'],
+                   uselib_store='LOG4CXX', mandatory=True)
+
+    boost_libs = 'system chrono program_options iostreams thread regex filesystem'
     if conf.options.with_tests:
         conf.env['WITH_TESTS'] = 1
         conf.define('WITH_TESTS', 1);
@@ -85,7 +88,7 @@
         features='cxx',
         source=bld.path.ant_glob(['src/**/*.cpp'],
                                  excl=['src/main.cpp']),
-        use='nsync-objects NDN_CPP BOOST',
+        use='nsync-objects NDN_CPP BOOST LOG4CXX',
         includes='. src',
         export_includes='. src',
         )
