While fixing up the test cli/convert/test_convert_args, I noticed that
some error messages were printed on stdout, and not using error causes.
Indeed, they are printed directly using printf.
Change them to use BT_CLI_LOGE_APPEND_CAUSE.
This is tested by a following patch which updates
cli/convert/test_convert_args.
Change-Id: I18a901d50b643293dd806c1fbe7d2372dc8bd46f
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3146
Tested-by: jenkins <jenkins@lttng.org>
switch (argpar_item_opt->descr->id) {
case OPT_BEGIN:
if (trimmer_has_begin) {
- printf("At --begin option: --begin or --timerange option already specified\n %s\n",
+ BT_CLI_LOGE_APPEND_CAUSE("At --begin option: --begin or --timerange option already specified\n %s\n",
arg);
goto error;
}
break;
case OPT_END:
if (trimmer_has_end) {
- printf("At --end option: --end or --timerange option already specified\n %s\n",
+ BT_CLI_LOGE_APPEND_CAUSE("At --end option: --end or --timerange option already specified\n %s\n",
arg);
goto error;
}
char *end;
if (trimmer_has_begin || trimmer_has_end) {
- printf("At --timerange option: --begin, --end, or --timerange option already specified\n %s\n",
+ BT_CLI_LOGE_APPEND_CAUSE("At --timerange option: --begin, --end, or --timerange option already specified\n %s\n",
arg);
goto error;
}