lib/log: Always flush after writing logs
authorJeremy Kerr <jk@ozlabs.org>
Fri, 1 Nov 2013 02:33:02 +0000 (10:33 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 1 Nov 2013 07:32:54 +0000 (15:32 +0800)
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 <jk@ozlabs.org>
lib/log/log.c

index b250a9ec26e71beea0761a44ce0efac729b50b2b..a4f5c22adde5ba9f54263237acfe17bea3117852 100644 (file)
@@ -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, ...)