Commit 70977c91 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

param: New "all" counterpart to "none" for vsl_mask

parent 63e4f71e
......@@ -680,6 +680,8 @@ tweak_generic_bits(struct vsb *vsb, const struct parspec *par, const char *arg,
if (arg != NULL && arg != JSON_FMT) {
if (sign == '+' && !strcmp(arg, "none"))
bit_clear(p, l);
else if (sign == '-' && !strcmp(arg, "all"))
bit_clear(p, l);
else
return (bit_tweak(vsb, p, l, arg, tags, desc, sign));
} else {
......@@ -693,7 +695,7 @@ tweak_generic_bits(struct vsb *vsb, const struct parspec *par, const char *arg,
}
}
if (*s == '\0')
VSB_cat(vsb, sign == '+' ? "none" : "(all enabled)");
VSB_cat(vsb, sign == '+' ? "none" : "all");
if (arg == JSON_FMT)
VSB_putc(vsb, '"');
}
......
......@@ -9,6 +9,7 @@ varnish v1 -cliok "param.set vsl_mask +WorkThread,+TTL,+Hash"
varnish v1 -cliok "param.show vsl_mask"
varnish v1 -cliexpect {"value": "none"} "param.set -j feature none"
varnish v1 -cliexpect {"value": "all"} "param.set -j vsl_mask all"
varnish v1 -clierr 106 "param.set vsl_mask FooBar"
varnish v1 -clierr 106 "param.set vsl_mask -FooBar"
......
......@@ -1881,6 +1881,7 @@ PARAM_BITS(
"-WorkThread",
/* descr */
"Mask individual VSL messages from being logged.\n"
"\tall\tEnable all tags\n"
"\tdefault\tSet default value\n"
"\nUse +/- prefix in front of VSL tag name to unmask/mask "
"individual VSL messages.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment