summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-10-04 22:08:19 +0200
committerwm4 <wm4@nowhere>2017-10-04 22:08:19 +0200
commit10dd120baa00991934e5efa807fa1c230a443401 (patch)
treeb8edd21965d5b34c23977f3dd6e8f4c9178e7053 /common
parentbfae72a2788d576bfa04c7e670fe68b52163e85f (diff)
downloadmpv-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')
-rw-r--r--common/msg.c2
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",