30 #ifndef NLSR_LOGGER_HPP 31 #define NLSR_LOGGER_HPP 33 #include <log4cxx/logger.h> 35 #define INIT_LOGGER(name) \ 36 static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger(name) 38 #define NLSR_LOG_TRACE(x) \ 39 LOG4CXX_TRACE(staticModuleLogger, x) 41 #define NLSR_LOG_DEBUG(x) \ 42 LOG4CXX_DEBUG(staticModuleLogger, x) 44 #define NLSR_LOG_INFO(x) \ 45 LOG4CXX_INFO(staticModuleLogger, x) 47 #define NLSR_LOG_WARN(x) \ 48 LOG4CXX_WARN(staticModuleLogger, x) 50 #define NLSR_LOG_ERROR(x) \ 51 LOG4CXX_ERROR(staticModuleLogger, x) 53 #define NLSR_LOG_FATAL(x) \ 54 LOG4CXX_FATAL(staticModuleLogger, x); 57 INIT_LOGGERS(
const std::string& logDir,
const std::string& logLevel);
65 #endif // NLSR_LOGGER_HPP void INIT_LOGGERS(const std::string &logDir, const std::string &logLevel)
bool isValidLogLevel(const std::string &logLevel)
void INIT_LOG4CXX(const std::string &log4cxxConfPath)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.