From 107c105e403f4c4cbd2257219c088d62a3875082 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 20 Apr 2017 13:38:20 -0700 Subject: log: Fix missing add_logger, fix clearing of queue --- host/tests/log_test.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'host/tests/log_test.cpp') diff --git a/host/tests/log_test.cpp b/host/tests/log_test.cpp index 1973a83ff..d42e5ffbd 100644 --- a/host/tests/log_test.cpp +++ b/host/tests/log_test.cpp @@ -20,9 +20,17 @@ #include BOOST_AUTO_TEST_CASE(test_messages){ - uhd::log::set_log_level(uhd::log::info); + uhd::log::set_log_level(uhd::log::debug); uhd::log::set_console_level(uhd::log::info); - std::cerr << "---begin print test ---" << std::endl; + uhd::log::add_logger("test", + [](const uhd::log::logging_info &I){ + std::cout << " " << I.message << std::endl; + } + ); + uhd::log::set_logger_level("test", uhd::log::debug); + UHD_LOGGER_DEBUG("logger_test") << + "This is a test print for a debug log." + ; UHD_LOGGER_INFO("logger_test") << "This is a test print for a info log." ; @@ -35,5 +43,4 @@ BOOST_AUTO_TEST_CASE(test_messages){ UHD_HERE(); const int x = 42; UHD_VAR(x); - std::cerr << "---end print test ---" << std::endl; } -- cgit v1.2.3