From 17d66daefc09991f07f36dd353e2792803f6127f Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Sun, 28 Jul 2024 14:39:22 +0200 Subject: [PATCH] Send libpcsclite.so logs to stderr instead of stdout Thanks to Jan Palus for the bug report "libpcsclite should not log errors to stdout" https://salsa.debian.org/rousseau/PCSC/-/issues/97 --- src/libredirect.c | 4 ++-- src/spy/libpcscspy.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libredirect.c b/src/libredirect.c index 3227ea10..4b9153e1 100644 --- a/src/libredirect.c +++ b/src/libredirect.c @@ -115,8 +115,8 @@ static void log_line(const char *fmt, ...) va_list args; va_start(args, fmt); - vprintf(fmt, args); - printf("\n"); + vfprintf(stderr, fmt, args); + fprintf(stderr, "\n"); va_end(args); } #else diff --git a/src/spy/libpcscspy.c b/src/spy/libpcscspy.c index 7719e428..484dffc7 100644 --- a/src/spy/libpcscspy.c +++ b/src/spy/libpcscspy.c @@ -102,8 +102,8 @@ static void log_line(const char *fmt, ...) va_list args; va_start(args, fmt); - vprintf(fmt, args); - printf("\n"); + vfprintf(stderr, fmt, args); + fprintf(stderr, "\n"); va_end(args); } #else