lttng add-trigger: replace log level options with --log-level
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 15 Apr 2021 02:28:07 +0000 (22:28 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 22 Apr 2021 05:10:51 +0000 (01:10 -0400)
commit949f049bd7bd19725768d46e349178c7c0da12a7
treef93fc09e42479038d2b9021f2fc2aafb5e7b6fad
parent24de704ea32ddb8841624555457b9c46816090b0
lttng add-trigger: replace log level options with --log-level

Implement the proposal to replace the --loglevel and --loglevel-only
options with a single --log-level option.

The syntax of the argument to --log-level is:

 - `LEVEL`: to specify only this level
 - `LEVEL..`: to specify from this level up to the most critical level
 - `..`: to specify any level. Basically the same as no `--log-level`
         option.

The intent is to keep the door open to fully support ranges with the
`LEVEL1..LEVEL2` syntax.  The loglevel_parse_range_string function and
friends are implement this, but their caller in add_trigger.c,
parse_log_level_string, artificially restricts it to the two cases
shown above.

Change-Id: Id8607b3dae2db5aace263f0c56ada2e822db907c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/add_trigger.c
src/bin/lttng/loglevel.c
src/bin/lttng/loglevel.h
tests/regression/tools/trigger/test_add_trigger_cli
tests/regression/tools/trigger/test_list_triggers_cli
This page took 0.025361 seconds and 4 git commands to generate.