babeltrace-cfg-cli-args-connect.h \
babeltrace-cfg-cli-args-default.h \
babeltrace-cfg-cli-args-default.c \
- logging.h
+ logging.c logging.h
# -Wl,--no-as-needed is needed for recent gold linker who seems to think
# it knows better and considers libraries with constructors having
* SOFTWARE.
*/
+#define BT_LOG_TAG "CLI"
+#include "logging.h"
+
#include <babeltrace/babeltrace.h>
#include <babeltrace/plugin/plugin.h>
#include <babeltrace/common-internal.h>
#include "babeltrace-cfg-cli-args.h"
#include "babeltrace-cfg-cli-args-default.h"
-#define BT_LOG_TAG "CLI"
-#include "logging.h"
-
#define ENV_BABELTRACE_WARN_COMMAND_NAME_DIRECTORY_CLASH "BABELTRACE_CLI_WARN_COMMAND_NAME_DIRECTORY_CLASH"
/* Application's processing graph (weak) */
GPtrArray *loaded_plugins;
-BT_HIDDEN
-int bt_cli_log_level = BT_LOG_NONE;
-
static
void sigint_handler(int signum)
{
--- /dev/null
+/*
+ * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#define BT_LOG_OUTPUT_LEVEL bt_cli_log_level
+#include <babeltrace/logging-internal.h>
+
+BT_LOG_INIT_LOG_LEVEL(bt_cli_log_level, "BABELTRACE_CLI_LOG_LEVEL");
#define CLI_LOGGING_H
/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* SOFTWARE.
*/
-#include <babeltrace/babeltrace-internal.h>
-
#define BT_LOG_OUTPUT_LEVEL bt_cli_log_level
-
#include <babeltrace/logging-internal.h>
-BT_HIDDEN
-int bt_cli_log_level;
+BT_LOG_LEVEL_EXTERN_SYMBOL(bt_cli_log_level);
#endif /* CLI_LOGGING_H */