diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2021-08-03 13:05:37 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-11-19 14:00:08 -0500 |
commit | 1bb08e8004aa8ba6637db3f06abdc283ea56c18a (patch) | |
tree | 39140de01d77dee6999f85e90d9fa9dc7cf8471f /gnuradio-runtime/lib/basic_block.cc | |
parent | cb60862fd493a0141946ff9dddc5a98c9c67690b (diff) |
logging core: replace log4cpp by spdlog
also: enable formerly disabled qa_logger tests
This replaces log4cpp with spdlog.
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime/lib/basic_block.cc')
-rw-r--r-- | gnuradio-runtime/lib/basic_block.cc | 9 |
1 files changed, 7 insertions, 2 deletions
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 ** |