From c8a4bf2613308c2a93cfbe0d1fc97e9b289dfe12 Mon Sep 17 00:00:00 2001 From: faluco Date: Mon, 1 Feb 2021 12:51:14 +0100 Subject: [PATCH] - Fix unused variable in buffer_pool.h - Replaced logger to srslog in log_args utility function. --- lib/include/srslte/common/buffer_pool.h | 6 +----- lib/include/srslte/common/common_helper.h | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/include/srslte/common/buffer_pool.h b/lib/include/srslte/common/buffer_pool.h index 721109880..ac53087c0 100644 --- a/lib/include/srslte/common/buffer_pool.h +++ b/lib/include/srslte/common/buffer_pool.h @@ -167,11 +167,7 @@ public: static std::unique_ptr instance; static byte_buffer_pool* get_instance(int capacity = -1); static void cleanup(); - byte_buffer_pool(int capacity = -1) - { - log = nullptr; - pool = new buffer_pool(capacity); - } + byte_buffer_pool(int capacity = -1) { pool = new buffer_pool(capacity); } byte_buffer_pool(const byte_buffer_pool& other) = delete; byte_buffer_pool& operator=(const byte_buffer_pool& other) = delete; ~byte_buffer_pool() { delete pool; } diff --git a/lib/include/srslte/common/common_helper.h b/lib/include/srslte/common/common_helper.h index 45c637907..bac36b581 100644 --- a/lib/include/srslte/common/common_helper.h +++ b/lib/include/srslte/common/common_helper.h @@ -19,6 +19,7 @@ #define SRSLTE_COMMON_HELPER_H #include "srslte/common/logmap.h" +#include "srslte/srslog/srslog.h" #include #include #include @@ -34,8 +35,8 @@ inline void log_args(int argc, char* argv[], const std::string& service) } s1 << std::endl; - srslte::logmap::get(service)->set_level(srslte::LOG_LEVEL_INFO); - srslte::logmap::get(service)->info("%s", s1.str().c_str()); + srslog::fetch_basic_logger(service, false).set_level(srslog::basic_levels::info); + srslog::fetch_basic_logger(service).info("%s", s1.str().c_str()); } inline void check_scaling_governor(const std::string& device_name)