From 3f79a0e117a59460faeabc29a710ff95c59034cd Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 22 Dec 2016 16:25:07 +0100 Subject: [PATCH] log: Flushing logs on every line This is needed for the new testing framework since we wait for messages to be printed on stdout. Buffering delays this arbitrarily. Flushing so often should not have much of a performance impact. --- daemon/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/log.c b/daemon/log.c index b1860d74e..3011b3c13 100644 --- a/daemon/log.c +++ b/daemon/log.c @@ -55,6 +55,7 @@ static void log_default_print(const char *prefix, } else { printf("%s \t%s\n", prefix, str); } + fflush(stdout); } static size_t log_bufsize(const struct log_entry *e)