You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
458 B

  1. #include <log4cplus/logger.h>
  2. #include <log4cplus/helpers/loglog.h>
  3. using namespace log4cplus;
  4. using namespace log4cplus::helpers;
  5. const LogLevel CRITICAL_LOG_LEVEL = 45000;
  6. #define LOG4CPLUS_CRITICAL(logger, logEvent) \
  7. if(logger.isEnabledFor(CRITICAL_LOG_LEVEL)) { \
  8. log4cplus::tostringstream _log4cplus_buf; \
  9. _log4cplus_buf << logEvent; \
  10. logger.forcedLog(CRITICAL_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
  11. }