diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/utils/log.hpp | 9 | ||||
-rw-r--r-- | host/include/uhd/utils/msg.hpp | 9 | ||||
-rw-r--r-- | host/include/uhd/utils/safe_call.hpp | 4 |
3 files changed, 6 insertions, 16 deletions
diff --git a/host/include/uhd/utils/log.hpp b/host/include/uhd/utils/log.hpp index 666dfa982..8d8f42fd0 100644 --- a/host/include/uhd/utils/log.hpp +++ b/host/include/uhd/utils/log.hpp @@ -54,7 +54,7 @@ * Usage: UHD_LOGV(very_rarely) << "the log message" << std::endl; */ #define UHD_LOGV(verbosity) \ - uhd::_log::log(uhd::_log::verbosity, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) + uhd::_log::log(uhd::_log::verbosity, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION)() /*! * A UHD logger macro with default verbosity. @@ -85,12 +85,7 @@ namespace uhd{ namespace _log{ const std::string &function ); ~log(void); - - std::ostream &get(void); - - template <typename T> std::ostream &operator<<(const T &x){ - return get() << x; - } + std::ostream &operator()(void); }; }} //namespace uhd::_log diff --git a/host/include/uhd/utils/msg.hpp b/host/include/uhd/utils/msg.hpp index 2313215bf..17179f551 100644 --- a/host/include/uhd/utils/msg.hpp +++ b/host/include/uhd/utils/msg.hpp @@ -27,7 +27,7 @@ * Usage: UHD_MSG(warning) << "some warning message" << std::endl; */ #define UHD_MSG(type) \ - uhd::msg::_msg(uhd::msg::type) + uhd::msg::_msg(uhd::msg::type)() namespace uhd{ namespace msg{ @@ -55,12 +55,7 @@ namespace uhd{ namespace msg{ struct UHD_API_FUTURE _msg{ _msg(const type_t type); ~_msg(void); - - std::ostream &get(void); - - template <typename T> std::ostream &operator<<(const T &x){ - return get() << x; - } + std::ostream &operator()(void); }; }} //namespace uhd::msg diff --git a/host/include/uhd/utils/safe_call.hpp b/host/include/uhd/utils/safe_call.hpp index b9f545b23..ab287cc66 100644 --- a/host/include/uhd/utils/safe_call.hpp +++ b/host/include/uhd/utils/safe_call.hpp @@ -20,10 +20,10 @@ #include <uhd/config.hpp> #include <uhd/exception.hpp> -#include <uhd/utils/msg.hpp> +#include <uhd/utils/log.hpp> //! helper macro for safe call to produce warnings -#define _UHD_SAFE_CALL_WARNING(code, what) UHD_MSG(warning) << \ +#define _UHD_SAFE_CALL_WARNING(code, what) UHD_LOGV(rarely) << \ UHD_THROW_SITE_INFO("Exception caught in safe-call.") + #code + " -> " + what \ ; |