summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/top_block_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib/top_block_impl.cc')
-rw-r--r--gnuradio-runtime/lib/top_block_impl.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/gnuradio-runtime/lib/top_block_impl.cc b/gnuradio-runtime/lib/top_block_impl.cc
index bfc2bf310f..393f8adbe5 100644
--- a/gnuradio-runtime/lib/top_block_impl.cc
+++ b/gnuradio-runtime/lib/top_block_impl.cc
@@ -15,6 +15,7 @@
#include "flat_flowgraph.h"
#include "scheduler_tpb.h"
#include "top_block_impl.h"
+#include <gnuradio/logger.h>
#include <gnuradio/prefs.h>
#include <gnuradio/top_block.h>
@@ -57,8 +58,12 @@ make_scheduler(flat_flowgraph_sptr ffg, int max_noutput_items, bool catch_except
}
}
if (factory == 0) {
- std::cerr << "warning: Invalid GR_SCHEDULER environment variable value \""
- << v << "\". Using \"" << scheduler_table[0].name << "\"\n";
+ gr::logger_ptr logger, debug_logger;
+ gr::configure_default_loggers(logger, debug_logger, "top_block_impl");
+ std::ostringstream msg;
+ msg << "Invalid GR_SCHEDULER environment variable value \"" << v
+ << "\". Using \"" << scheduler_table[0].name << "\"";
+ GR_LOG_WARN(logger, msg.str());
factory = scheduler_table[0].f;
}
}
@@ -74,13 +79,16 @@ top_block_impl::top_block_impl(top_block* owner, bool catch_exceptions = true)
d_retry_wait(false),
d_catch_exceptions(catch_exceptions)
{
+ gr::configure_default_loggers(d_logger, d_debug_logger, "top_block_impl");
}
top_block_impl::~top_block_impl()
{
if (d_lock_count) {
- std::cerr << "error: destroying locked block." << std::endl;
+ GR_LOG_ERROR(d_logger, "destroying locked block.");
}
+ // NOTE: Investigate the sensibility of setting a raw pointer to zero at the end of
+ // destructor
d_owner = 0;
}