plugins/ctf/lttng-live: use standard logging files and macros
[babeltrace.git] / plugins / ctf / lttng-live / lttng-live.c
index a84c9cc459a60cc225c4813c393794dc8197080b..33cd94a00280d6480ed6cce397594b526514fb76 100644 (file)
@@ -27,6 +27,9 @@
  * SOFTWARE.
  */
 
+#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-SRC"
+#include "logging.h"
+
 #include <babeltrace/ctf-ir/packet.h>
 #include <babeltrace/graph/component-source.h>
 #include <babeltrace/graph/private-port.h>
@@ -48,9 +51,6 @@
 #include <unistd.h>
 #include <plugins-common.h>
 
-#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE"
-#define BT_LOGLEVEL_NAME "BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_LOG_LEVEL"
-
 #include "data-stream.h"
 #include "metadata.h"
 #include "lttng-live-internal.h"
@@ -83,9 +83,6 @@ static const char *print_state(struct lttng_live_stream_iterator *s)
                        print_state(stream), stream->last_returned_inactivity_timestamp,        \
                        stream->current_inactivity_timestamp)
 
-BT_HIDDEN
-int bt_lttng_live_log_level = BT_LOG_NONE;
-
 BT_HIDDEN
 int lttng_live_add_port(struct lttng_live_component *lttng_live,
                struct lttng_live_stream_iterator *stream_iter)
@@ -1117,9 +1114,3 @@ end:
        bt_put(self_port);
        return status;
 }
-
-static
-void __attribute__((constructor)) bt_lttng_live_logging_ctor(void)
-{
-        bt_lttng_live_log_level = bt_log_get_level_from_env(BT_LOGLEVEL_NAME);
-}
This page took 0.02411 seconds and 4 git commands to generate.