From d64c33c518d50d195cb95fb5c5f9f3db1562cedb Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 28 Sep 2017 12:28:48 +0200 Subject: msg: bump up log level of --log-file This now logs -v -v by default, instead of -v. --- DOCS/man/options.rst | 6 +++--- common/msg.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 118bdde31e..676860f156 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -412,9 +412,9 @@ Program Behavior ``--log-file=`` Opens the given path for writing, and print log messages to it. Existing - files will be truncated. The log level is at least ``-v``, but can be - raised via ``--msg-level`` (the option cannot lower it below the forced - minimum log level). + files will be truncated. The log level is at least ``-v -v``, but + can be raised via ``--msg-level`` (the option cannot lower it below the + forced minimum log level). ``--config-dir=`` Force a different configuration directory. If this is set, the given diff --git a/common/msg.c b/common/msg.c index c8190106cd..b8e89bec31 100644 --- a/common/msg.c +++ b/common/msg.c @@ -120,7 +120,7 @@ static void update_loglevel(struct mp_log *log) for (int n = 0; n < log->root->num_buffers; n++) log->level = MPMAX(log->level, log->root->buffers[n]->level); if (log->root->log_file) - log->level = MPMAX(log->level, MSGL_V); + log->level = MPMAX(log->level, MSGL_DEBUG); if (log->root->stats_file) log->level = MPMAX(log->level, MSGL_STATS); atomic_store(&log->reload_counter, atomic_load(&log->root->reload_counter)); @@ -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 (!root->log_file || lev > MPMAX(MSGL_V, log->terminal_level)) + if (!root->log_file || lev > MPMAX(MSGL_DEBUG, log->terminal_level)) return; fprintf(root->log_file, "[%8.3f][%c][%s] %s", -- cgit v1.2.3