diff options
author | Andrej Rode <andrej.rode@ettus.com> | 2017-02-07 16:37:25 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-02-20 17:13:15 -0800 |
commit | 21aad77c9ca07f4271136b9241f5adb00a6bb908 (patch) | |
tree | 636ffe3ab2296e9afa661d3a12eb359224cd3254 /host/lib/transport/libusb1_base.cpp | |
parent | 2b33f2bb4c01d4306fd46f78edf6e355a03e2ed7 (diff) | |
download | uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.tar.gz uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.tar.bz2 uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.zip |
utils: introduce new logging API and remove msg API
Diffstat (limited to 'host/lib/transport/libusb1_base.cpp')
-rw-r--r-- | host/lib/transport/libusb1_base.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp index 720e54e4d..2a6fc2b8a 100644 --- a/host/lib/transport/libusb1_base.cpp +++ b/host/lib/transport/libusb1_base.cpp @@ -17,7 +17,7 @@ #include "libusb1_base.hpp" #include <uhd/exception.hpp> -#include <uhd/utils/msg.hpp> + #include <uhd/utils/log.hpp> #include <uhd/utils/tasks.hpp> #include <uhd/types/dict.hpp> @@ -76,7 +76,7 @@ private: case LIBUSB_ERROR_NO_DEVICE: throw uhd::io_error(libusb_strerror(LIBUSB_ERROR_NO_DEVICE)); default: - UHD_MSG(error) << __FUNCTION__ << ": " << libusb_strerror((libusb_error)ret) << std::endl; + UHD_LOGGER_ERROR("USB") << __FUNCTION__ << ": " << libusb_strerror((libusb_error)ret) ; break; } } @@ -275,15 +275,15 @@ public: { int ret; ret = libusb_clear_halt(this->get(), recv_endpoint | 0x80); - UHD_LOG << "usb device handle: recv endpoint clear: " << libusb_error_name(ret) << std::endl; + UHD_LOGGER_DEBUG("USB") << "usb device handle: recv endpoint clear: " << libusb_error_name(ret) ; ret = libusb_clear_halt(this->get(), send_endpoint | 0x00); - UHD_LOG << "usb device handle: send endpoint clear: " << libusb_error_name(ret) << std::endl; + UHD_LOGGER_DEBUG("USB") << "usb device handle: send endpoint clear: " << libusb_error_name(ret) ; } void reset_device(void) { int ret = libusb_reset_device(this->get()); - UHD_LOG << "usb device handle: dev Reset: " << libusb_error_name(ret) << std::endl; + UHD_LOGGER_DEBUG("USB") << "usb device handle: dev Reset: " << libusb_error_name(ret) ; } private: @@ -320,12 +320,12 @@ libusb::device_handle::sptr libusb::device_handle::get_cached_handle(device::spt } catch(const uhd::exception &){ #ifdef UHD_PLATFORM_LINUX - UHD_MSG(error) << + UHD_LOGGER_ERROR("USB") << "USB open failed: insufficient permissions.\n" "See the application notes for your device.\n" - << std::endl; + ; #else - UHD_LOG << "USB open failed: device already claimed." << std::endl; + UHD_LOGGER_DEBUG("USB") << "USB open failed: device already claimed." ; #endif throw; } |