conf: Add log4cxx path to conf file

refs: #1950

Change-Id: I51f9217c6ee40fd49a53d5f8294b60fb306e82ee
diff --git a/src/main.cpp b/src/main.cpp
index a21b0fd..45772aa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -66,13 +66,20 @@
         return EXIT_FAILURE;
       }
   }
+
   ConfFileProcessor cfp(nlsr, nlsr.getConfFileName());
   if (!cfp.processConfFile()) {
     std::cerr << "Error in configuration file processing! Exiting from NLSR" << std::endl;
     return EXIT_FAILURE;
   }
 
-  INIT_LOGGERS(nlsr.getConfParameter().getLogDir(), nlsr.getConfParameter().getLogLevel());
+  if (nlsr.getConfParameter().isLog4CxxConfAvailable()) {
+    INIT_LOG4CXX(nlsr.getConfParameter().getLog4CxxConfPath());
+  }
+  else {
+    INIT_LOGGERS(nlsr.getConfParameter().getLogDir(), nlsr.getConfParameter().getLogLevel());
+  }
+
   INIT_LOGGER("Main");
 
   nlsr.initialize();
@@ -96,4 +103,4 @@
 main(int32_t argc, char** argv)
 {
   return nlsr::main(argc, argv);
-}
+}
\ No newline at end of file