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_meta_source_impl.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/gr-blocks/lib/file_meta_source_impl.cc b/gr-blocks/lib/file_meta_source_impl.cc
index 5f114a3182..e5d7f5a46a 100644
--- a/gr-blocks/lib/file_meta_source_impl.cc
+++ b/gr-blocks/lib/file_meta_source_impl.cc
@@ -263,7 +263,7 @@ bool file_meta_source_impl::_open(FILE** fp, const char* filename)
     int fd;
 
     if ((fd = ::open(filename, O_RDONLY | OUR_O_LARGEFILE | OUR_O_BINARY)) < 0) {
-        perror(filename);
+        GR_LOG_ERROR(d_logger, boost::format("%s: %s") % filename % strerror(errno));
         return false;
     }
 
@@ -273,7 +273,7 @@ bool file_meta_source_impl::_open(FILE** fp, const char* filename)
     }
 
     if ((*fp = fdopen(fd, "rb")) == NULL) {
-        perror(filename);
+        GR_LOG_ERROR(d_logger, boost::format("%s: %s") % filename % strerror(errno));
         ::close(fd); // don't leak file descriptor if fdopen fails.
     }
 
-- 
cgit v1.2.3