sink.utils.counter: honor component's initial log level
[babeltrace.git] / src / plugins / utils / counter / counter.c
index 42ac5ad6585b310efdad5c1fae0730ad4ace0341..2438a4e02a8c3dc028c5e6c3ee106ca9283151f4 100644 (file)
@@ -20,8 +20,9 @@
  * SOFTWARE.
  */
 
+#define BT_LOG_OUTPUT_LEVEL (counter->log_level)
 #define BT_LOG_TAG "PLUGIN/FLT.UTILS.COUNTER"
-#include "logging.h"
+#include "logging/log.h"
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
@@ -150,6 +151,9 @@ bt_self_component_status counter_init(
                goto error;
        }
 
+       counter->log_level = bt_component_get_logging_level(
+               bt_self_component_as_component(
+                       bt_self_component_sink_as_self_component(component)));
        ret = bt_self_component_sink_add_input_port(component,
                "in", NULL, NULL);
        if (ret != BT_SELF_COMPONENT_STATUS_OK) {
This page took 0.025465 seconds and 4 git commands to generate.