ric: adding logger to RIC client

master
yagoda 2 years ago committed by Justin Tallon
parent ec8bf3ea6f
commit b3d3c4436f

@ -118,7 +118,8 @@ int enb::init(const all_args_t& args_)
ret = SRSRAN_ERROR;
}
}
std::unique_ptr<srsenb::ric_client> tmp_ric_client = std::unique_ptr<srsenb::ric_client>(new srsenb::ric_client());
std::unique_ptr<srsenb::ric_client> tmp_ric_client =
std::unique_ptr<srsenb::ric_client>(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;

@ -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

@ -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");

Loading…
Cancel
Save