}
if (bt_value_map_has_entry(query_result, "group")) {
- enum bt_value_type group_value_type;
-
group_value = bt_value_map_borrow_entry_value_const(query_result, "group");
BT_ASSERT(group_value);
- group_value_type = bt_value_get_type(group_value);
-
- if (group_value_type == BT_VALUE_TYPE_NULL) {
- /* Do as if no value was passed. */
- group_value = NULL;
- } else if (bt_value_get_type(group_value) != BT_VALUE_TYPE_STRING) {
+ if (bt_value_get_type(group_value) != BT_VALUE_TYPE_STRING) {
BT_LOGW("babeltrace.support-info query: unexpected type for entry `group`: "
"component-class-name=source.%s.%s, input=%s, input-type=%s, "
"expected-entry-type=%s,%s, actual-entry-type=%s",
}
BT_LOGD("babeltrace.support-info query: success: component-class-name=source.%s.%s, input=%s, "
- "type=%s, weight=%f\n",
+ "type=%s, weight=%f, group=%s\n",
bt_plugin_get_name(plugin), bt_component_class_get_name(cc), input,
- input_type, weight);
+ input_type, weight, group_value ? bt_value_string_get(group_value) : "(none)");
if (weight > winner.weigth) {
winner.source = source_cc;
plugin_name = bt_plugin_get_name(winner.plugin);
group = winner.group ? bt_value_string_get(winner.group) : NULL;
- BT_LOGI("Input %s is awarded to component class source.%s.%s with weight %f",
- input, plugin_name, source_name, winner.weigth);
+ BT_LOGI("Input awarded: input=%s, type=%s, component-class-name=source.%s.%s, weight=%f, group=%s",
+ input, input_type, plugin_name, source_name, winner.weigth, group ? group : "(none)");
status = auto_source_discovery_add(auto_disc, plugin_name,
source_name, group, input, original_input_index, log_level);
goto error;
}
} else {
- BT_LOGI("Input %s (%s) was not recognized by any source component class.",
+ BT_LOGI("Input not recognized: input=%s, type=%s",
input, input_type);
status = AUTO_SOURCE_DISCOVERY_INTERNAL_STATUS_NO_MATCH;
}
log_level, auto_disc, interrupter);
if (internal_status < 0 || internal_status == AUTO_SOURCE_DISCOVERY_INTERNAL_STATUS_INTERRUPTED) {
/* Fatal error or we got interrupted. */
- status = internal_status;
+ status = (auto_source_discovery_status) internal_status;
goto end;
} else if (internal_status == AUTO_SOURCE_DISCOVERY_INTERNAL_STATUS_OK) {
/* A component class has claimed this input as an arbitrary string. */
component_class_restrict, log_level, auto_disc, interrupter);
if (internal_status < 0 || internal_status == AUTO_SOURCE_DISCOVERY_INTERNAL_STATUS_INTERRUPTED) {
/* Fatal error or we got interrupted. */
- status = internal_status;
+ status = (auto_source_discovery_status) internal_status;
goto end;
} else if (internal_status == 0) {
/*