From b08de841267546726f452c89cc326a493ec6549c Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 1 Nov 2013 10:33:02 +0800 Subject: [PATCH] lib/log: Always flush after writing logs We're currently seeing empty log files from the discover server. Rather than only flishing if the server was compiled with debugging enabled, always perform the fflush. Signed-off-by: Jeremy Kerr --- lib/log/log.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/log/log.c b/lib/log/log.c index b250a9e..a4f5c22 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -12,8 +12,7 @@ static void __log(const char *fmt, va_list ap) if (!logf) return; vfprintf(logf, fmt, ap); - if (debug) - fflush(logf); + fflush(logf); } void pb_log(const char *fmt, ...) -- 2.39.2