From 23621e44dece125baba725b897310b9ef2ce245d Mon Sep 17 00:00:00 2001 From: randomdan Date: Sat, 8 Nov 2014 18:10:32 +0000 Subject: Add a Boost UTF Project2 logger --- project2/ut/Jamfile.jam | 1 + project2/ut/butf_logger.cpp | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 project2/ut/butf_logger.cpp diff --git a/project2/ut/Jamfile.jam b/project2/ut/Jamfile.jam index 0c7aa08..dc0d734 100644 --- a/project2/ut/Jamfile.jam +++ b/project2/ut/Jamfile.jam @@ -4,6 +4,7 @@ lib p2ut : [ glob *.cpp ] : ../common//p2common + boost_utf : : BOOST_TEST_DYN_LINK boost_utf diff --git a/project2/ut/butf_logger.cpp b/project2/ut/butf_logger.cpp new file mode 100644 index 0000000..c5f45b4 --- /dev/null +++ b/project2/ut/butf_logger.cpp @@ -0,0 +1,21 @@ +#include +#include "logger.h" +#include "options.h" + +/// Logger that writes Boost Unit Test Framework messages +class BoostUTFLogDriver : public LogDriverBase { + public: + BoostUTFLogDriver() + { + } + void message(int, const char * msg) const + { + BOOST_TEST_MESSAGE(msg); + } + static int level; +}; + +int BoostUTFLogDriver::level = LOG_DEBUG; + +DECLARE_LOGGER_LOADER("boostutf", BoostUTFLogDriver); + -- cgit v1.2.3