flush stderr after a log message appears

We had the problem that the log file appeared empty for a long time due
to file buffers. Thus we call fflush() after every log message so the
log file gets written out to disk quickly
This commit is contained in:
Christian Kruse
2014-02-15 01:29:12 +01:00
parent c4ac2d3343
commit d58fd080ca

2
log.c
View File

@@ -58,6 +58,8 @@ void stderr_log_with_level(const char *level_name, int level, const char *fmt, .
vfprintf(stderr, fmt1, ap);
va_end(ap);
fflush(stderr);
}
}