From: Martin Wilck Subject: [PATCH 04/14] libmultipath: condlog: log to stderr Date: Fri, 12 Jan 2018 23:07:33 +0100 Message-ID: <20180112220743.11513-5-mwilck@suse.com> References: <20180112220743.11513-1-mwilck@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180112220743.11513-1-mwilck@suse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Christophe Varoqui , dm-devel@redhat.com Cc: Martin Wilck List-Id: dm-devel.ids Calling 'multipath' might result in various error messages, all of which should be directed to stderr. Having them intermixed with the actual output on stdout makes parsing really hard. Signed-off-by: Martin Wilck --- libmultipath/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/debug.c b/libmultipath/debug.c index f89b26443ea5..f95a3e5f97f5 100644 --- a/libmultipath/debug.c +++ b/libmultipath/debug.c @@ -37,9 +37,9 @@ void dlog (int sink, int prio, const char * fmt, ...) "%b %d %H:%M:%S", tb); buff[sizeof(buff)-1] = '\0'; - fprintf(stdout, "%s | ", buff); + fprintf(stderr, "%s | ", buff); } - vfprintf(stdout, fmt, ap); + vfprintf(stderr, fmt, ap); } else log_safe(prio + 3, fmt, ap); -- 2.15.1