This pattern is found in other headers where, instead of including the
logging header for the user, we ask her to set up the logging and then
include the header.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I922b09f63eff41b9c3ba30df7ace0b8b30b5b5b2
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1443
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
#include "lib/object.h"
#include <babeltrace2/types.h>
#include "common/assert.h"
-#include "lib/lib-logging.h"
#include <glib.h>
#include "plugin-so.h"
+/* Protection: this file uses BT_LIB_LOG*() macros directly */
+#ifndef BABELTRACE_LIB_LOGGING_INTERNAL_H
+# error Please include "lib/lib-logging.h" before including this file.
+#endif
+
enum bt_plugin_type {
BT_PLUGIN_TYPE_SO = 0,
BT_PLUGIN_TYPE_PYTHON = 1,
#define BT_LOG_TAG "PLUGIN-PY"
+#include "lib/lib-logging.h"
#include "common/macros.h"
#include "compat/compiler.h"
#include <babeltrace2/plugin/plugin-const.h>