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()
