[Mini-NDN] Logging module configuration - Not able to see logs in nfd.log file

Aman Maldar amanmaldar at gmail.com
Thu Feb 22 11:50:32 PST 2018


Hello Everyone,

I went through previous reply by  Mr Gawande .
A reference to previous discussion-
http://www.lists.cs.ucla.edu/pipermail/mini-ndn/2017-November/000343.html


I am trying to add logging module to
mini-ndn/NFD/tools/nfdc/forwarder-general-module.cpp.
 I already have added logging module in other files and I am aware how it
works. Though, I have a trouble here.

*Changes made in  forwarder-general-module.cpp:*

added a logging module, --  #include "core/logger.hpp"

initialization, -- NFD_LOG_INIT("Forwarder")

void
ForwarderGeneralModule::formatItemText(std::ostream& os, const
ForwarderStatus& item) const
{

  os << "               version=" << item.getNfdVersion() << "\n";
....
//  Code lines deleted in mail
....
  os << "             nOutNacks=" << item.getNOutNacks() << "\n";

*// added a new statement*
NFD_LOG_INFO("New Data: " << item.getNCsEntries() <<"#" <<
item.getNPitEntries() << "#" << item.getNFibEntries() << "#");

}

nfd.conf also has an entry for FORWARDER INFO logs.

sudo ./waf
sudo ./waf install



When, I execute mini-ndn>> a nfdc status show,  [The above function is
called.]

Instead of getting above statement in nfd.log, I get that on terminal
itself after "NFD forwarder status".

*output*
mini-ndn> a nfdc status show
  version=0.6.0-35-g7bb9a2a
             startTime=20180222T182418.370000
           currentTime=20180222T192017.524000
                uptime=3359 seconds
      nNameTreeEntries=48
           nFibEntries=18
           nPitEntries=3
  nMeasurementsEntries=0
            nCsEntries=403
          nInInterests=15088
         nOutInterests=15510
               nInData=2042
              nOutData=3174
              nInNacks=27
             nOutNacks=28
1519328070.376059 INFO: [Forwarder] New Data: 78#4#18#


Am I missing something. I want to get that in log file.  I also see none of
the files in " mini-ndn/NFD/tools/nfdc/ " folder has logging module used.

Thank you.
-- 
*Regards,*
*Mr. Maldar Aman M.*
*University of Massachusetts, Lowell*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20180222/16181d20/attachment.html>


More information about the Mini-NDN mailing list