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.

21 lines
646 B

  1. #include "log4cplus/logger.h"
  2. #include "log4cplus/helpers/loglog.h"
  3. #include "log4cplus/loggingmacros.h"
  4. using namespace log4cplus;
  5. using namespace log4cplus::helpers;
  6. void
  7. writeLogMessage()
  8. {
  9. {
  10. Logger subTest = Logger::getInstance(LOG4CPLUS_TEXT("test.subtest"));
  11. subTest.log(FATAL_LOG_LEVEL, LOG4CPLUS_TEXT("Entering writeLogMessage()..."));
  12. LOG4CPLUS_FATAL(subTest, "writeLogMessage()- This is a message from a different file");
  13. subTest.log(FATAL_LOG_LEVEL, LOG4CPLUS_TEXT("Exiting writeLogMessage()..."));
  14. }
  15. LogLog::getLogLog()->warn(LOG4CPLUS_TEXT("REALLY exiting writeLogMessage()..."));
  16. }