From c31033a5fe1af1632a11c03de2290650ba8a82c6 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 29 Jul 2013 12:35:38 +0200 Subject: [PATCH] Log messages to stderr. --- src/log.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/log.c b/src/log.c index 05acddf..a791450 100644 --- a/src/log.c +++ b/src/log.c @@ -46,9 +46,9 @@ void log_message(int level, const char *file, int line, const char *format, ...) #endif /* Prevent another thread from interrupting the two printfs(). */ - flockfile(stdout); + flockfile(stderr); - fprintf(stdout, + fprintf(stderr, #ifdef DEBUG "%-12s:%-3d " #endif @@ -58,9 +58,9 @@ void log_message(int level, const char *file, int line, const char *format, ...) #endif level_string, (int)pthread_self()); va_start(ap, format); - vfprintf(stdout, format, ap); + vfprintf(stderr, format, ap); va_end(ap); - fprintf(stdout, "\n"); + fprintf(stderr, "\n"); - funlockfile(stdout); + funlockfile(stderr); } -- 2.44.2