aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
authorAndrej Rode <andrej.rode@ettus.com>2017-02-07 16:37:25 -0800
committerMartin Braun <martin.braun@ettus.com>2017-02-20 17:13:15 -0800
commit21aad77c9ca07f4271136b9241f5adb00a6bb908 (patch)
tree636ffe3ab2296e9afa661d3a12eb359224cd3254 /host/tests
parent2b33f2bb4c01d4306fd46f78edf6e355a03e2ed7 (diff)
downloaduhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.tar.gz
uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.tar.bz2
uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.zip
utils: introduce new logging API and remove msg API
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/CMakeLists.txt2
-rw-r--r--host/tests/log_test.cpp (renamed from host/tests/msg_test.cpp)19
2 files changed, 10 insertions, 11 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index c691ce1fd..ebda2cf70 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -36,8 +36,8 @@ SET(test_sources
fp_compare_delta_test.cpp
fp_compare_epsilon_test.cpp
gain_group_test.cpp
+ log_test.cpp
math_test.cpp
- msg_test.cpp
property_test.cpp
ranges_test.cpp
sid_t_test.cpp
diff --git a/host/tests/msg_test.cpp b/host/tests/log_test.cpp
index 94b81268c..1973a83ff 100644
--- a/host/tests/msg_test.cpp
+++ b/host/tests/log_test.cpp
@@ -16,22 +16,21 @@
//
#include <boost/test/unit_test.hpp>
-#include <uhd/utils/msg.hpp>
+#include <uhd/utils/log.hpp>
#include <iostream>
BOOST_AUTO_TEST_CASE(test_messages){
+ uhd::log::set_log_level(uhd::log::info);
+ uhd::log::set_console_level(uhd::log::info);
std::cerr << "---begin print test ---" << std::endl;
- UHD_MSG(status) <<
- "This is a test print for a status message.\n"
- "And this is the second line of the test print.\n"
+ UHD_LOGGER_INFO("logger_test") <<
+ "This is a test print for a info log."
;
- UHD_MSG(warning) <<
- "This is a test print for a warning message.\n"
- "And this is the second line of the test print.\n"
+ UHD_LOGGER_WARNING("logger_test") <<
+ "This is a test print for a warning log."
;
- UHD_MSG(error) <<
- "This is a test print for an error message.\n"
- "And this is the second line of the test print.\n"
+ UHD_LOGGER_ERROR("logger_test") <<
+ "This is a test print for an error log."
;
UHD_HERE();
const int x = 42;