From 1bb08e8004aa8ba6637db3f06abdc283ea56c18a Mon Sep 17 00:00:00 2001
From: Marcus Müller <mmueller@gnuradio.org>
Date: Tue, 3 Aug 2021 13:05:37 +0200
Subject: logging core: replace log4cpp by spdlog
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

also: enable formerly disabled qa_logger tests

This replaces log4cpp with spdlog.

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
---
 gnuradio-runtime/lib/basic_block.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'gnuradio-runtime/lib/basic_block.cc')

diff --git a/gnuradio-runtime/lib/basic_block.cc b/gnuradio-runtime/lib/basic_block.cc
index 988b399572..08ae079172 100644
--- a/gnuradio-runtime/lib/basic_block.cc
+++ b/gnuradio-runtime/lib/basic_block.cc
@@ -8,6 +8,7 @@
  *
  */
 
+#include <memory>
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -36,9 +37,12 @@ basic_block::basic_block(const std::string& name,
       d_symbol_name(global_block_registry.register_symbolic_name(this)),
       d_color(WHITE),
       d_rpc_set(false),
+      d_logger(std::make_shared<gr::logger>(name)),
+      d_debug_logger(std::make_shared<logger_ptr::element_type>(name + " (debug)")),
       d_message_subscribers(pmt::make_dict())
 {
-    configure_default_loggers(d_logger, d_debug_logger, d_symbol_name);
+    d_logger->set_level(logging::singleton().default_level());
+    d_debug_logger->set_level(logging::singleton().debug_level());
     s_ncurrently_allocated++;
 }
 
@@ -62,7 +66,8 @@ void basic_block::set_block_alias(std::string name)
 
     // set the block's alias
     d_symbol_alias = name;
-    update_logger_alias(symbol_name(), d_symbol_alias);
+    d_logger->set_name(name);
+    d_debug_logger->set_name(name + " (debug)");
 }
 
 // ** Message passing interface **
-- 
cgit v1.2.3