summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-01 19:39:47 +0100
committerwm4 <wm4@nowhere>2014-01-01 19:42:48 +0100
commit2214ee847237cf077904e55b0fc688f5c5ceff19 (patch)
tree65f062239353c774541e0f235d564a94e4de2044 /options
parentcf4a110261fc054baec5672dbc3b8ee1289702b5 (diff)
downloadmpv-2214ee847237cf077904e55b0fc688f5c5ceff19.tar.bz2
mpv-2214ee847237cf077904e55b0fc688f5c5ceff19.tar.xz
options: make --msglevel=help print something helpful
Diffstat (limited to 'options')
-rw-r--r--options/m_option.c11
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});