adjust to use ndn-cxx logging

refs: #4435

Change-Id: If8709c24f7bdc5503e9b0b7b46aca5c1a65a5c2a
diff --git a/install.sh b/install.sh
index 110beb6..37eeeea 100755
--- a/install.sh
+++ b/install.sh
@@ -113,14 +113,6 @@
         cxx="true"
     fi
 
-    if [[ $DIST == Ubuntu ]]; then
-        $install liblog4cxx10-dev
-    fi
-
-    if [[ $DIST == Fedora ]]; then
-        $install log4cxx log4cxx-devel openssl-devel
-    fi
-
     git clone --depth 1 https://github.com/named-data/ChronoSync
     cd ChronoSync
     ./waf configure
diff --git a/ndn/nlsr.py b/ndn/nlsr.py
index 2d72775..d880aaf 100644
--- a/ndn/nlsr.py
+++ b/ndn/nlsr.py
@@ -52,7 +52,8 @@
         self.createFaces()
 
     def start(self):
-        NdnApplication.start(self, "nlsr -f {} > /dev/null 2>&1 &".format(self.confFile))
+        self.node.cmd("export NDN_LOG=nlsr.*={}".format(self.node.nlsrParameters.get("nlsr-log-level", "DEBUG")))
+        NdnApplication.start(self, "nlsr -f {} > log/nlsr.log 2>&1 &".format(self.confFile))
         time.sleep(1)
 
     def createFaces(self):
@@ -152,7 +153,6 @@
         self.hyperbolicState = parameters.get("hyperbolic-state", "off")
         self.hyperRadius = parameters.get("radius", 0.0)
         self.hyperAngle = parameters.get("angle", 0.0)
-        self.logLevel = parameters.get("nlsr-log-level", "DEBUG")
         self.neighborIPs = []
         self.node.cmd("sudo cp /usr/local/etc/ndn/nlsr.conf.sample nlsr.conf")
 
@@ -170,7 +170,6 @@
         self.node.cmd("{} -s general.network -v {}".format(self.infocmd, NETWORK))
         self.node.cmd("{} -s general.site -v /{}-site".format(self.infocmd, self.node.name))
         self.node.cmd("{} -s general.router -v /%C1.Router/cs/{}".format(self.infocmd, self.node.name))
-        self.node.cmd("{} -s general.log-level -v {}".format(self.infocmd, self.logLevel))
         self.node.cmd("{} -s general.log-dir -v {}/log".format(self.infocmd, self.node.homeFolder))
         self.node.cmd("{} -s general.seq-dir -v {}/log".format(self.infocmd, self.node.homeFolder))
 
@@ -227,4 +226,4 @@
             self.node.cmd("{} -s security.prefix-update-validator.trust-anchor.file-name -v security/site.cert".format(self.infocmd))
             self.node.cmd("{} -p security.cert-to-publish -v security/site.cert".format(self.infocmd))
             self.node.cmd("{} -p security.cert-to-publish -v security/op.cert".format(self.infocmd))
-            self.node.cmd("{} -p security.cert-to-publish -v security/router.cert".format(self.infocmd))
\ No newline at end of file
+            self.node.cmd("{} -p security.cert-to-publish -v security/router.cert".format(self.infocmd))