[Nfd-dev] NFD Boost Logging

Lan Wang (lanwang) lanwang at memphis.edu
Mon Jun 5 09:16:07 PDT 2017


I think Damian wants to do module specific logging in NLSR.  Can you tell him how to do this using the logger in ndn-cxx?

Lan

On Jun 5, 2017, at 11:13 AM, Junxiao Shi <shijunxiao at email.arizona.edu<mailto:shijunxiao at email.arizona.edu>> wrote:

Hi Damian

NFD having separate logging code is due to historical reason: NFD logging predates ndn-cxx logging.
NFD calling setDestination is to avoid conflicts: log entries may appear twice if both NFD and ndn-cxx initializes Boost.Log.

Yours, Junxiao


On Jun 5, 2017 09:08, "Damian Matthew Coomes (dmcoomes)" <dmcoomes at memphis.edu<mailto:dmcoomes at memphis.edu>> wrote:

NDN Community,


I was looking through NFD's version of boost logging and I would like some clarification. Although I do see that NFD uses ndn-cxx's setDestination and flush functions directly, the functions contained in the logger and the logger factory files seem mostly to be redefinitions of those in ndn-cxx. Chronosync, on the other hand, uses ndn-cxx's logging directly. What was the reason for NFD's way of handling loggers? Was it done so you could have more control over NFD's loggers? One issue that I have run into with implementing ndn-cxx's boost logging in NLSR is filtering the loggers to only display logs from NLSR. For instance if I use setLevel("*", ndn::util::Loglevel::DEBUG), it will log from modules in ndn-cxx and chronosync as well. Is this why NFD has declared its own set of loggers?

Thanks,

Damian


_______________________________________________
Nfd-dev mailing list
Nfd-dev at lists.cs.ucla.edu<mailto:Nfd-dev at lists.cs.ucla.edu>
http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev


_______________________________________________
Nfd-dev mailing list
Nfd-dev at lists.cs.ucla.edu<mailto:Nfd-dev at lists.cs.ucla.edu>
http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20170605/9892353b/attachment-0001.html>


More information about the Nfd-dev mailing list