diff options
author | wm4 <wm4@nowhere> | 2014-01-01 19:39:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-01 20:57:22 +0100 |
commit | 965f33691779a6c7e7efb527c00ebd2f9b3b0f45 (patch) | |
tree | bfab0e3c1b463b45e54f572e75d7b5f5957076bc /options/m_option.c | |
parent | 47fae324c7ebccc53d1e9be82be4b9eb26cc4cb2 (diff) | |
download | mpv-965f33691779a6c7e7efb527c00ebd2f9b3b0f45.tar.bz2 mpv-965f33691779a6c7e7efb527c00ebd2f9b3b0f45.tar.xz |
options: make --msglevel=help print something helpful
Diffstat (limited to 'options/m_option.c')
-rw-r--r-- | options/m_option.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/options/m_option.c b/options/m_option.c index 9f98008c64..0ec886a8df 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1299,6 +1299,17 @@ static int parse_msglevels(struct mp_log *log, const m_option_t *opt, if (param.start == NULL) return M_OPT_MISSING_PARAM; + if (bstr_equals0(param, "help")) { + mp_info(log, "Syntax: --msglevel=module1=level:module2=level:...\n" + "'module' is output prefix as shown with -v, or a prefix\n" + "of it. level is one of:\n\n" + " fatal error warn info status v debug trace\n\n" + "The level specifies the minimum log level a message\n" + "must have to be printed.\n" + "The special module name 'all' affects all modules.\n"); + return M_OPT_EXIT; + } + bstr s = param; while (1) { int res = mp_msg_split_msglevel(&s, &(bstr){0}, &(int){0}); |