summaryrefslogtreecommitdiffstats
path: root/host/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/utils')
-rw-r--r--host/lib/utils/log.cpp3
-rw-r--r--host/lib/utils/msg.cpp8
2 files changed, 9 insertions, 2 deletions
diff --git a/host/lib/utils/log.cpp b/host/lib/utils/log.cpp
index d99ce01c4..f67a14411 100644
--- a/host/lib/utils/log.cpp
+++ b/host/lib/utils/log.cpp
@@ -140,7 +140,7 @@ private:
//! set the log level from a string that is either a digit or an enum name
void _set_log_level(const std::string &log_level_str){
const uhd::_log::verbosity_t log_level = uhd::_log::verbosity_t(log_level_str[0]-'0');
- if (std::isdigit(log_level_str[0]) and log_level >= uhd::_log::always and log_level <= uhd::_log::very_rarely){
+ if (std::isdigit(log_level_str[0]) and log_level >= uhd::_log::always and log_level <= uhd::_log::never){
_log_level = log_level;
}
#define if_lls_equal(name) else if(log_level_str == #name) _log_level = uhd::_log::name
@@ -149,6 +149,7 @@ private:
if_lls_equal(regularly);
if_lls_equal(rarely);
if_lls_equal(very_rarely);
+ if_lls_equal(never);
}
//available stream objects
diff --git a/host/lib/utils/msg.cpp b/host/lib/utils/msg.cpp
index de6d4c8fa..0eaca05a5 100644
--- a/host/lib/utils/msg.cpp
+++ b/host/lib/utils/msg.cpp
@@ -71,16 +71,23 @@ void uhd::msg::register_handler(const handler_t &handler){
static void default_msg_handler(uhd::msg::type_t type, const std::string &msg){
switch(type){
+ case uhd::msg::fastpath:
+ std::cerr << msg << std::flush;
+ break;
+
case uhd::msg::status:
msg_to_cout(msg);
+ UHD_LOG << "Status message" << std::endl << msg;
break;
case uhd::msg::warning:
msg_to_cerr("UHD Warning", msg);
+ UHD_LOG << "Warning message" << std::endl << msg;
break;
case uhd::msg::error:
msg_to_cerr("UHD Error", msg);
+ UHD_LOG << "Error message" << std::endl << msg;
break;
}
}
@@ -99,7 +106,6 @@ uhd::msg::_msg::_msg(const type_t type){
uhd::msg::_msg::~_msg(void){
msg_handler(msg_type, msg_ss.str());
- UHD_LOG << "Message " << char(msg_type) << std::endl << msg_ss.str();
msg_ss.str(""); //clear for next call
msg_mutex.unlock();
}