diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2020-04-11 00:43:39 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-04-13 15:55:41 +0200 |
commit | 0f88db1ef0569bf6fcd5e9c843da38d487a6f54b (patch) | |
tree | 4c9827377c0e98fe223f39edb0c84c8a49c199e9 /gnuradio-runtime/lib/local_sighandler.cc | |
parent | ec8a92846a388cb0d2982822ea1961910cd552f8 (diff) |
runtime: replace stderr logging by calls to GR's logging facilties
Diffstat (limited to 'gnuradio-runtime/lib/local_sighandler.cc')
-rw-r--r-- | gnuradio-runtime/lib/local_sighandler.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/local_sighandler.cc b/gnuradio-runtime/lib/local_sighandler.cc index 2f2b72063b..a50dab79c2 100644 --- a/gnuradio-runtime/lib/local_sighandler.cc +++ b/gnuradio-runtime/lib/local_sighandler.cc @@ -31,8 +31,10 @@ local_sighandler::local_sighandler(int signum, void (*new_handler)(int)) sigemptyset(&new_action.sa_mask); new_action.sa_flags = 0; + gr::configure_default_loggers(d_logger, d_debug_logger, "local_sighandler"); if (sigaction(d_signum, &new_action, &d_old_action) < 0) { - perror("sigaction (install new)"); + GR_LOG_ERROR(d_logger, + boost::format("sigaction (install new): %s") % strerror(errno)) throw std::runtime_error("sigaction"); } #endif @@ -42,7 +44,8 @@ local_sighandler::~local_sighandler() noexcept(false) { #ifdef HAVE_SIGACTION if (sigaction(d_signum, &d_old_action, 0) < 0) { - perror("sigaction (restore old)"); + GR_LOG_ERROR(d_logger, + boost::format("sigaction (restore old): %s") % strerror(errno)) throw std::runtime_error("sigaction"); } #endif |