diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2012-09-17 11:12:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-09-19 14:57:32 +0200 |
commit | 020a954b60fccb15711d8e5b26a71e54bc6050c7 (patch) | |
tree | 96f2655dfcb8e758d56ba263e6a14f3a6d1eca6b /mp_msg.c | |
parent | 2f1bc6beb68e79b5c6fb7f2ad9fe60c57eccf76e (diff) | |
download | mpv-020a954b60fccb15711d8e5b26a71e54bc6050c7.tar.bz2 mpv-020a954b60fccb15711d8e5b26a71e54bc6050c7.tar.xz |
mp_msg: use stdout for all output except status; put status on stderr
improves interaction with | less, | grep, ...
Diffstat (limited to 'mp_msg.c')
-rw-r--r-- | mp_msg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -201,7 +201,7 @@ static void print_msg_module(FILE* stream, int mod) void mp_msg_va(int mod, int lev, const char *format, va_list va) { char tmp[MSGSIZE_MAX]; - FILE *stream = lev <= MSGL_WARN ? stderr : stdout; + FILE *stream = lev == MSGL_STATUS ? stderr : stdout; static int header = 1; // indicates if last line printed was a status line static int statusline; @@ -215,7 +215,7 @@ void mp_msg_va(int mod, int lev, const char *format, va_list va) * status line, and does not end with a '\n'. If we're printing a normal * line instead after the status one print '\n' to change line. */ if (statusline && lev != MSGL_STATUS) - fprintf(stream, "\n"); + fprintf(stderr, "\n"); statusline = lev == MSGL_STATUS; if (header) |