lib: use BT_LIB_LOG*_APPEND_CAUSE() where appropriate
[babeltrace.git] / src / lib / graph / component-class-sink-colander.c
index b68a3ab0461074cc71f26b456671b4688697ad42..771c626885931c54759354edbd02f46d7da58dd9 100644 (file)
@@ -44,8 +44,7 @@ enum bt_component_class_init_method_status colander_init(
                struct bt_self_component_sink *self_comp,
                const struct bt_value *params, void *init_method_data)
 {
-       enum bt_component_class_init_method_status status =
-               BT_FUNC_STATUS_OK;
+       int status = BT_FUNC_STATUS_OK;
        struct bt_component_class_sink_colander_priv_data *colander_data = NULL;
        struct bt_component_class_sink_colander_data *user_provided_data =
                init_method_data;
@@ -54,7 +53,8 @@ enum bt_component_class_init_method_status colander_init(
        colander_data = g_new0(
                struct bt_component_class_sink_colander_priv_data, 1);
        if (!colander_data) {
-               BT_LOGE_STR("Failed to allocate colander data.");
+               BT_LIB_LOGE_APPEND_CAUSE(
+                       "Failed to allocate colander sink data.");
                status = BT_FUNC_STATUS_MEMORY_ERROR;
                goto end;
        }
@@ -64,7 +64,8 @@ enum bt_component_class_init_method_status colander_init(
        status = bt_self_component_sink_add_input_port(self_comp, "in",
                NULL, NULL);
        if (status != BT_FUNC_STATUS_OK) {
-               BT_LOGE_STR("Cannot add input port.");
+               BT_LIB_LOGE_APPEND_CAUSE(
+                       "Cannot add input port to colander sink.");
                goto end;
        }
 
@@ -112,7 +113,7 @@ colander_graph_is_configured(
                bt_self_component_port_input_message_iterator_create(
                        self_port);
        if (!colander_data->msg_iter) {
-               BT_LIB_LOGE("Cannot create message iterator on "
+               BT_LIB_LOGE_APPEND_CAUSE("Cannot create message iterator on "
                        "self component input port: %![port-]+p",
                        self_port);
                status = BT_FUNC_STATUS_MEMORY_ERROR;
@@ -170,7 +171,8 @@ struct bt_component_class_sink *bt_component_class_sink_colander_get(void)
        colander_comp_cls = bt_component_class_sink_create("colander",
                colander_consume);
        if (!colander_comp_cls) {
-               BT_LOGE_STR("Cannot create sink colander component class.");
+               BT_LIB_LOGE_APPEND_CAUSE(
+                       "Cannot create sink colander component class.");
                goto end;
        }
 
This page took 0.024219 seconds and 4 git commands to generate.