From 95178211eb87d6bf40d51210cf501e6e840863fe Mon Sep 17 00:00:00 2001
From: Marcus Müller <mmueller@gnuradio.org>
Date: Sat, 11 Apr 2020 01:04:25 +0200
Subject: blocks: replace stderr logging by calls to GR's logging facilties

---
 gr-blocks/lib/file_descriptor_source_impl.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'gr-blocks/lib/file_descriptor_source_impl.cc')

diff --git a/gr-blocks/lib/file_descriptor_source_impl.cc b/gr-blocks/lib/file_descriptor_source_impl.cc
index 36c761108b..33f317103f 100644
--- a/gr-blocks/lib/file_descriptor_source_impl.cc
+++ b/gr-blocks/lib/file_descriptor_source_impl.cc
@@ -107,7 +107,9 @@ int file_descriptor_source_impl::work(int noutput_items,
             if (errno == EINTR)
                 continue;
             else {
-                perror("file_descriptor_source[read]");
+                GR_LOG_ERROR(d_logger,
+                             boost::format("file_descriptor_source[read]: %s") %
+                                 strerror(errno));
                 return -1;
             }
         } else if (r == 0) { // end of file
@@ -116,7 +118,9 @@ int file_descriptor_source_impl::work(int noutput_items,
             else {
                 flush_residue();
                 if (lseek(d_fd, 0, SEEK_SET) == -1) {
-                    perror("file_descriptor_source[lseek]");
+                    GR_LOG_ERROR(d_logger,
+                                 boost::format("file_descriptor_source[lseek]: %s") %
+                                     strerror(errno));
                     return -1;
                 }
             }
-- 
cgit v1.2.3