lttng-live: change loglevel env var to BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_LOG_LEVEL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 May 2017 21:37:30 +0000 (17:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:43 +0000 (12:57 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/lttng-live/lttng-live.c

index 813674fae1512be27a12d98609f67b1892147391..3c5e04db79f9de1b3941ec262d1d4b7b7c3ca39f 100644 (file)
@@ -48,6 +48,7 @@
 #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"
@@ -1104,7 +1105,7 @@ static
 void __attribute__((constructor)) bt_lttng_live_logging_ctor(void)
 {
        enum bt_logging_level log_level = BT_LOG_NONE;
-       const char *log_level_env = getenv("BABELTRACE_PLUGIN_LTTNG_LIVE_LOG_LEVEL");
+       const char *log_level_env = getenv(BT_LOGLEVEL_NAME);
 
        if (!log_level_env) {
                return;
@@ -1124,7 +1125,8 @@ void __attribute__((constructor)) bt_lttng_live_logging_ctor(void)
                log_level = BT_LOGGING_LEVEL_FATAL;
        } else {
                bt_lttng_live_log_level = BT_LOGGING_LEVEL_FATAL;
-               BT_LOGF("Incorrect log level specified in BABELTRACE_PLUGIN_LTTNG_LIVE_LOG_LEVEL");
+               BT_LOGF("Incorrect log level specified in %s",
+                               BT_LOGLEVEL_NAME);
                abort();
        }
 
This page took 0.026577 seconds and 4 git commands to generate.