summaryrefslogtreecommitdiffstats
path: root/common/msg.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-23 20:42:20 +0200
committerwm4 <wm4@nowhere>2017-06-23 20:42:20 +0200
commit633152e55a6f851c58267793081dea3162acfb48 (patch)
tree47c1b2f740c552a9273cdc7d9439d3918d6baeb8 /common/msg.c
parent48970cd485bf2811d1bbfcd69de55ff4f9c412e2 (diff)
downloadmpv-633152e55a6f851c58267793081dea3162acfb48.tar.bz2
mpv-633152e55a6f851c58267793081dea3162acfb48.tar.xz
options: remove weird --really-quiet special behavior
This was especially grating because it causes problems with the option/property unification, uses as only thing OPT_FLAG_STORE, and behaves weird with the client API or scripts. It can be reimplemented in a much simpler way, although it needs slightly more code. (Simpler because less special cases.)
Diffstat (limited to 'common/msg.c')
-rw-r--r--common/msg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/msg.c b/common/msg.c
index cf2bd5c242..6e981406ff 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -57,6 +57,7 @@ struct mp_log_root {
int status_lines; // number of current status lines
bool color;
int verbose;
+ bool really_quiet;
bool force_stderr;
struct mp_log_buffer **buffers;
int num_buffers;
@@ -110,7 +111,9 @@ static void update_loglevel(struct mp_log *log)
{
struct mp_log_root *root = log->root;
pthread_mutex_lock(&mp_msg_lock);
- log->level = MSGL_STATUS + log->root->verbose; // default log level
+ log->level = MSGL_STATUS; // default log level
+ if (root->really_quiet)
+ log->level -= 10;
for (int n = 0; root->msg_levels && root->msg_levels[n * 2 + 0]; n++) {
if (match_mod(log->verbose_prefix, root->msg_levels[n * 2 + 0]))
log->level = mp_msg_find_level(root->msg_levels[n * 2 + 1]);
@@ -511,6 +514,7 @@ void mp_msg_update_msglevels(struct mpv_global *global)
pthread_mutex_lock(&mp_msg_lock);
root->verbose = opts->verbose;
+ root->really_quiet = opts->msg_really_quiet;
root->module = opts->msg_module;
root->use_terminal = opts->use_terminal;
root->show_time = opts->msg_time;