src: Adding log4cxx logging
Refs: #1505
Change-Id: Ib154d91f81acf3f1dd8bbcf552062a16d03fec74
diff --git a/src/logger.hpp b/src/logger.hpp
new file mode 100644
index 0000000..241b732
--- /dev/null
+++ b/src/logger.hpp
@@ -0,0 +1,19 @@
+#ifndef NLSR_LOGGER_HPP
+#define NLSR_LOGGER_HPP
+
+#include <log4cxx/logger.h>
+
+
+#define INIT_LOGGER(name) \
+ static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger(name)
+
+#define _LOG_DEBUG(x) \
+ LOG4CXX_DEBUG(staticModuleLogger,x)
+
+#define _LOG_INFO(x) \
+ LOG4CXX_INFO(staticModuleLogger, x)
+
+void
+INIT_LOGGERS(const std::string& logDir);
+
+#endif // NLSR_LOGGER_HPP