src: Adding log4cxx logging
Refs: #1505
Change-Id: Ib154d91f81acf3f1dd8bbcf552062a16d03fec74
diff --git a/src/main.cpp b/src/main.cpp
index 9e3bf12..2054e56 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,6 +20,7 @@
#include <boost/cstdint.hpp>
#include "nlsr.hpp"
#include "conf-file-processor.hpp"
+#include "logger.hpp"
using namespace nlsr;
@@ -54,12 +55,13 @@
}
}
ConfFileProcessor cfp(nlsr, nlsr.getConfFileName());
- int32_t res = cfp.processConfFile();
- if (res < 0) {
+ if(!cfp.processConfFile()) {
std::cerr << "Error in configuration file processing! Exiting from NLSR" <<
std::endl;
return EXIT_FAILURE;
}
+ INIT_LOGGERS(nlsr.getConfParameter().getLogDir());
+ INIT_LOGGER("Main");
nlsr.initialize();
try {
nlsr.startEventLoop();