From 047358f92e8cc77c6a387d1be8f0b51082255f91 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 15 May 2017 17:37:30 -0400 Subject: [PATCH] lttng-live: change loglevel env var to BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_LOG_LEVEL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- plugins/ctf/lttng-live/lttng-live.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/ctf/lttng-live/lttng-live.c b/plugins/ctf/lttng-live/lttng-live.c index 813674fa..3c5e04db 100644 --- a/plugins/ctf/lttng-live/lttng-live.c +++ b/plugins/ctf/lttng-live/lttng-live.c @@ -48,6 +48,7 @@ #include #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(); } -- 2.34.1