mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-11 16:52:54 +02:00
MINOR: trace: support -dt optional format
Add an optional argument for "-dt". This argument is interpreted as a list of several trace statement separated by comma. For each statement, a specific trace name can be specifed, or none to act on all sources. Using double-colon separator, it is possible to add specifications on the wanted level and verbosity.
This commit is contained in:
@@ -1708,7 +1708,17 @@ static void init_args(int argc, char **argv)
|
||||
kwd_dump = flag + 2;
|
||||
}
|
||||
else if (*flag == 'd' && flag[1] == 't') {
|
||||
trace_parse_cmd();
|
||||
if (argc > 1 && argv[1][0] != '-') {
|
||||
if (trace_parse_cmd(argv[1], &err_msg)) {
|
||||
ha_alert("-dt: %s.\n", err_msg);
|
||||
ha_free(&err_msg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
argc--; argv++;
|
||||
}
|
||||
else {
|
||||
trace_parse_cmd(NULL, NULL);
|
||||
}
|
||||
}
|
||||
else if (*flag == 'd')
|
||||
arg_mode |= MODE_DEBUG;
|
||||
|
||||
Reference in New Issue
Block a user