msg: flush after every message for --log-file

We'd like to get log messages on the output as soon as possible in the
output. I also feel like using fflush() is nicer than using setvbuf().
Who knows how the latter behaves on win32.
This commit is contained in:
wm4 2016-09-30 14:55:59 +02:00
parent 33c24b07e4
commit ea50f6fdef
1 changed files with 1 additions and 0 deletions

View File

@ -289,6 +289,7 @@ static void write_log_file(struct mp_log *log, int lev, char *text)
(mp_time_us() - MP_START_TIME) / 1e6,
mp_log_levels[lev][0],
log->verbose_prefix, text);
fflush(root->log_file);
}
static void write_msg_to_buffers(struct mp_log *log, int lev, char *text)