lib: set component's initial log level when adding it to the graph
[babeltrace.git] / src / lib / graph / iterator.c
index 42bc819a367ea858247d6ab534c5c81a822c5bbd..1303003f4963d7dbcc6f67963f89004590d2c0b8 100644 (file)
@@ -21,7 +21,7 @@
  * SOFTWARE.
  */
 
-#define BT_LOG_TAG "MSG-ITER"
+#define BT_LOG_TAG "LIB/MSG-ITER"
 #include "lib/lib-logging.h"
 
 #include "compat/compiler.h"
@@ -745,12 +745,19 @@ bt_port_output_message_iterator_create(struct bt_graph *graph,
        colander_data.msgs = (void *) iterator->base.msgs->pdata;
        colander_data.count_addr = &iterator->count;
 
-       /* Hope that nobody uses this very unique name */
+       /*
+        * Hope that nobody uses this very unique name.
+        *
+        * We pass `BT_LOGGING_LEVEL_NONE` but the colander component
+        * class module does not use this level anyway since it belongs
+        * to the library.
+        */
        graph_status =
                bt_graph_add_sink_component_with_init_method_data(
                        (void *) graph, colander_comp_cls,
                        "colander-36ac3409-b1a8-4d60-ab1f-4fdf341a8fb1",
-                       NULL, &colander_data, (void *) &iterator->colander);
+                       NULL, &colander_data, BT_LOGGING_LEVEL_NONE,
+                       (void *) &iterator->colander);
        if (graph_status != BT_GRAPH_STATUS_OK) {
                BT_LIB_LOGW("Cannot add colander sink component to graph: "
                        "%1[graph-]+g, status=%s", graph,
This page took 0.032622 seconds and 4 git commands to generate.