face: add logging statements in Face

refs #3563

Change-Id: Idd59a87badb1f05003f8a53802e13cec8d02b1ec
diff --git a/src/face.cpp b/src/face.cpp
index 1521788..2f80754 100644
--- a/src/face.cpp
+++ b/src/face.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -25,8 +25,10 @@
 #include "encoding/tlv.hpp"
 #include "net/face-uri.hpp"
 #include "security/signing-helpers.hpp"
-#include "util/time.hpp"
 #include "util/random.hpp"
+#include "util/time.hpp"
+
+// NDN_LOG_INIT(ndn.Face) is declared in face-impl.hpp
 
 // A callback scheduled through io.post and io.dispatch may be invoked after the face
 // is destructed. To prevent this situation, these macros captures Face::m_impl as weak_ptr,
@@ -174,6 +176,7 @@
   if (interestToExpress->wireEncode().size() > MAX_NDN_PACKET_SIZE) {
     BOOST_THROW_EXCEPTION(Error("Interest size exceeds maximum limit"));
   }
+  NDN_LOG_DEBUG("<I " << *interestToExpress); // interestToExpress is guaranteed to have nonce
 
   // If the same ioService thread, dispatch directly calls the method
   IO_CAPTURE_WEAK_IMPL(dispatch) {
@@ -233,6 +236,7 @@
   if (wire.size() > MAX_NDN_PACKET_SIZE)
     BOOST_THROW_EXCEPTION(Error("Data size exceeds maximum limit"));
 
+  NDN_LOG_DEBUG("<D " << data.getName());
   IO_CAPTURE_WEAK_IMPL(dispatch) {
     impl->asyncSend(wire);
   } IO_CAPTURE_WEAK_IMPL_END
@@ -256,6 +260,7 @@
   if (wire.size() > MAX_NDN_PACKET_SIZE)
     BOOST_THROW_EXCEPTION(Error("Nack size exceeds maximum limit"));
 
+  NDN_LOG_DEBUG("<N " << nack.getInterest() << '~' << nack.getHeader().getReason());
   IO_CAPTURE_WEAK_IMPL(dispatch) {
     impl->asyncSend(wire);
   } IO_CAPTURE_WEAK_IMPL_END
@@ -431,10 +436,12 @@
         auto nack = make_shared<lp::Nack>(std::move(*interest));
         nack->setHeader(lpPacket.get<lp::NackField>());
         extractLpLocalFields(*nack, lpPacket);
+        NDN_LOG_DEBUG(">N " << nack->getInterest() << '~' << nack->getHeader().getReason());
         m_impl->nackPendingInterests(*nack);
       }
       else {
         extractLpLocalFields(*interest, lpPacket);
+        NDN_LOG_DEBUG(">I " << *interest);
         m_impl->processInterestFilters(*interest);
       }
       break;
@@ -442,6 +449,7 @@
     case tlv::Data: {
       auto data = make_shared<Data>(netPacket);
       extractLpLocalFields(*data, lpPacket);
+      NDN_LOG_DEBUG(">D " << data->getName());
       m_impl->satisfyPendingInterests(*data);
       break;
     }