diff options
author | wm4 <wm4@nowhere> | 2014-01-01 19:39:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-01 19:42:48 +0100 |
commit | 2214ee847237cf077904e55b0fc688f5c5ceff19 (patch) | |
tree | 65f062239353c774541e0f235d564a94e4de2044 /options | |
parent | cf4a110261fc054baec5672dbc3b8ee1289702b5 (diff) |
options: make --msglevel=help print something helpful
Diffstat (limited to 'options')
-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 b6cfbdf0d0..7754c830d1 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1296,6 +1296,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}); |