* modules.
*/
static const char* log_level_env_var_names[] = {
- "BABELTRACE_COMMON_LOG_LEVEL",
- "BABELTRACE_COMPAT_LOG_LEVEL",
- "BABELTRACE_CTFSER_LOG_LEVEL",
- "BABELTRACE_FD_CACHE_LOG_LEVEL",
- "BABELTRACE_FLT_LTTNG_UTILS_DEBUG_INFO_LOG_LEVEL",
- "BABELTRACE_FLT_UTILS_COUNTER_LOG_LEVEL",
- "BABELTRACE_FLT_UTILS_MUXER_LOG_LEVEL",
- "BABELTRACE_FLT_UTILS_TRIMMER_LOG_LEVEL",
"BABELTRACE_PLUGIN_CTF_BFCR_LOG_LEVEL",
"BABELTRACE_PLUGIN_CTF_METADATA_LOG_LEVEL",
"BABELTRACE_PLUGIN_CTF_MSG_ITER_LOG_LEVEL",
"BABELTRACE_SINK_TEXT_DETAILS_LOG_LEVEL",
"BABELTRACE_SRC_CTF_FS_LOG_LEVEL",
"BABELTRACE_SRC_CTF_LTTNG_LIVE_LOG_LEVEL",
- "BABELTRACE_SRC_TEXT_DMESG_LOG_LEVEL",
NULL,
};
}
static
-int query(const bt_component_class *comp_cls, const char *obj,
- const bt_value *params, const bt_value **user_result,
- const char **fail_reason)
+int query(struct bt_config *cfg, const bt_component_class *comp_cls,
+ const char *obj, const bt_value *params,
+ const bt_value **user_result, const char **fail_reason)
{
const bt_value *result = NULL;
bt_query_executor_status status;
while (true) {
status = bt_query_executor_query(the_query_executor,
- comp_cls, obj, params, &result);
+ comp_cls, obj, params, cfg->log_level, &result);
switch (status) {
case BT_QUERY_EXECUTOR_STATUS_OK:
goto ok;
goto end;
}
- ret = query(comp_cls, cfg->cmd_data.query.object->str,
+ ret = query(cfg, comp_cls, cfg->cmd_data.query.object->str,
cfg->cmd_data.query.cfg_component->params,
&results, &fail_reason);
if (ret) {
goto error;
}
- ret = query(comp_cls, "sessions", params,
+ ret = query(cfg, comp_cls, "sessions", params,
&results, &fail_reason);
if (ret) {
goto failed;
goto end;
}
- ret = query(comp_cls, "metadata-info",
+ ret = query(cfg, comp_cls, "metadata-info",
params, &results, &fail_reason);
if (ret) {
goto failed;
const bt_component_class *comp_cls =
bt_component_class_source_as_component_class_const(src_comp_cls);
- ret = query(comp_cls, "trace-info",
+ ret = query(ctx->cfg, comp_cls, "trace-info",
cfg_comp->params, &query_result,
&fail_reason);
if (ret) {
goto error;
}
+ BT_ASSERT(cfg_comp->log_level >= BT_LOG_VERBOSE);
+
switch (cfg_comp->type) {
case BT_COMPONENT_CLASS_TYPE_SOURCE:
ret = bt_graph_add_source_component(ctx->graph,
comp_cls, cfg_comp->instance_name->str,
- cfg_comp->params, ctx->cfg->log_level,
+ cfg_comp->params, cfg_comp->log_level,
(void *) &comp);
break;
case BT_COMPONENT_CLASS_TYPE_FILTER:
ret = bt_graph_add_filter_component(ctx->graph,
comp_cls, cfg_comp->instance_name->str,
- cfg_comp->params, ctx->cfg->log_level,
+ cfg_comp->params, cfg_comp->log_level,
(void *) &comp);
break;
case BT_COMPONENT_CLASS_TYPE_SINK:
ret = bt_graph_add_sink_component(ctx->graph,
comp_cls, cfg_comp->instance_name->str,
- cfg_comp->params, ctx->cfg->log_level,
+ cfg_comp->params, cfg_comp->log_level,
(void *) &comp);
break;
default: