From 73171698b55133aaeab461781476b02c4416da8f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sun, 26 May 2019 18:53:38 -0700 Subject: log: Add convenience macros for logging from RFNoC blocks --- host/include/uhd/utils/log.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/host/include/uhd/utils/log.hpp b/host/include/uhd/utils/log.hpp index 89cb6b84d..9ea59d59a 100644 --- a/host/include/uhd/utils/log.hpp +++ b/host/include/uhd/utils/log.hpp @@ -222,6 +222,13 @@ UHD_API void set_logger_level(const std::string& logger, uhd::log::severity_leve # define UHD_LOG_FATAL(component, message) #endif +#define RFNOC_LOG_TRACE(message) UHD_LOG_TRACE(this->get_unique_id(), message) +#define RFNOC_LOG_DEBUG(message) UHD_LOG_DEBUG(this->get_unique_id(), message) +#define RFNOC_LOG_INFO(message) UHD_LOG_INFO(this->get_unique_id(), message) +#define RFNOC_LOG_WARNING(message) UHD_LOG_WARNING(this->get_unique_id(), message) +#define RFNOC_LOG_ERROR(message) UHD_LOG_ERROR(this->get_unique_id(), message) +#define RFNOC_LOG_FATAL(message) UHD_LOG_FATAL(this->get_unique_id(), message) + #ifndef UHD_LOG_FASTPATH_DISABLE //! Extra-fast logging macro for when speed matters. // No metadata is tracked. Only the message is displayed. This does not go -- cgit v1.2.3