diff options
author | wm4 <wm4@nowhere> | 2016-09-30 14:55:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-30 14:55:59 +0200 |
commit | ea50f6fdefc5968cafd68a7db7d49af5aefbd5b6 (patch) | |
tree | 292e270effe2748fb496afd3e6d5beefc56131bc /common/msg.c | |
parent | 33c24b07e4ee7d54ddfc84e529806faf1266a70a (diff) | |
download | mpv-ea50f6fdefc5968cafd68a7db7d49af5aefbd5b6.tar.bz2 mpv-ea50f6fdefc5968cafd68a7db7d49af5aefbd5b6.tar.xz |
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.
Diffstat (limited to 'common/msg.c')
-rw-r--r-- | common/msg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/msg.c b/common/msg.c index 4029698888..6d70f88db3 100644 --- a/common/msg.c +++ b/common/msg.c @@ -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) |