diff --git a/srsenb/src/enb.cc b/srsenb/src/enb.cc index f8130ba3e..0d4db990b 100644 --- a/srsenb/src/enb.cc +++ b/srsenb/src/enb.cc @@ -118,7 +118,8 @@ int enb::init(const all_args_t& args_) ret = SRSRAN_ERROR; } } - std::unique_ptr tmp_ric_client = std::unique_ptr(new srsenb::ric_client()); + std::unique_ptr tmp_ric_client = + std::unique_ptr(new srsenb::ric_client(srslog::fetch_basic_logger("RIC", log_sink, false))); if (tmp_ric_client == nullptr) { srsran::console("Error creating RIC client instance.\n"); return SRSRAN_ERROR; diff --git a/srsgnb/hdr/stack/ric/ric_client.h b/srsgnb/hdr/stack/ric/ric_client.h index a0ac9e731..c5ea078c7 100644 --- a/srsgnb/hdr/stack/ric/ric_client.h +++ b/srsgnb/hdr/stack/ric/ric_client.h @@ -24,7 +24,7 @@ namespace srsenb { class ric_client : public srsran::thread { public: - ric_client(); + ric_client(srslog::basic_logger& logger); bool init(); void stop(); void run_thread(); @@ -36,6 +36,7 @@ private: srsran::unique_socket ric_socket; struct sockaddr_in ric_addr = {}; // RIC address bool running = false; + srslog::basic_logger& logger; }; } // namespace srsenb diff --git a/srsgnb/src/stack/ric/ric_client.cc b/srsgnb/src/stack/ric/ric_client.cc index 6e150551e..754a69a5e 100644 --- a/srsgnb/src/stack/ric/ric_client.cc +++ b/srsgnb/src/stack/ric/ric_client.cc @@ -15,7 +15,7 @@ #include "stdint.h" using namespace srsenb; -ric_client::ric_client() : thread("RIC_CLIENT_THREAD") {} +ric_client::ric_client(srslog::basic_logger& logger) : logger(logger), thread("RIC_CLIENT_THREAD") {} bool ric_client::init() { printf("RIC_CLIENT: Init\n");