diff options
author | wm4 <wm4@nowhere> | 2017-10-04 22:08:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-04 22:08:19 +0200 |
commit | 10dd120baa00991934e5efa807fa1c230a443401 (patch) | |
tree | b8edd21965d5b34c23977f3dd6e8f4c9178e7053 /common/msg.c | |
parent | bfae72a2788d576bfa04c7e670fe68b52163e85f (diff) | |
download | mpv-10dd120baa00991934e5efa807fa1c230a443401.tar.bz2 mpv-10dd120baa00991934e5efa807fa1c230a443401.tar.xz |
msg: make --msg-level affect --log-file too
But --msg-level can only raise the log level used for --log-file,
because the original idea with --log-file was that it'd log verbose
messages to disk even if terminal logging is lower than -v or fully
disabled.
Diffstat (limited to 'common/msg.c')
-rw-r--r-- | common/msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/msg.c b/common/msg.c index 375eff9aad..c8190106cd 100644 --- a/common/msg.c +++ b/common/msg.c @@ -285,7 +285,7 @@ static void write_log_file(struct mp_log *log, int lev, char *text) { struct mp_log_root *root = log->root; - if (lev > MSGL_V || !root->log_file) + if (!root->log_file || lev > MPMAX(MSGL_V, log->terminal_level)) return; fprintf(root->log_file, "[%8.3f][%c][%s] %s", |