cli: add component-specific `--log-level` option (run/convert commands)
This new option makes it possible to specify a log level for a specific
component instance. The main program's `--log-level` option becomes the
default log level which the specific `--log-level` options override.
For example:
babeltrace2 -c src.mein.source --log-level=I \
-c sink.ctf.fs --log-level=D
makes the log level of the source be INFO and the log level of the
sink be DEBUG. The log level of the other components (implicit muxer),
of the CLI, and of the library is the default WARN.
babeltrace2 --log-level=E -c src.mein.source --log-level=I \
-c sink.ctf.fs
makes the log level of the source be INFO and the log level of the sink,
of the other components (implicit muxer), of the CLI, and of the library
be ERROR.
The CLI still sets the known log level environment variables until
subsequent patches make each component honor its initial log level, that
is, until each component uses the log level for its logging statements
as returned by bt_component_get_logging_level().
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I8a3b05b7147fdb0149ecff670c542c9a229beddb
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1458
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
This page took 0.0259 seconds and 4 git commands to generate.