Logging: require modules to define BT_LOG_OUTPUT_LEVEL
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 31 May 2017 14:42:33 +0000 (10:42 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Jun 2017 20:58:13 +0000 (16:58 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/logging-internal.h
logging/log.c

index e9ce365e19281f8b478960f760b9ccbe68b505b1..8805306e9424228a052dbc0a8b44f8c094264559 100644 (file)
 #if defined(BT_LOG_OUTPUT_LEVEL)
        #define _BT_LOG_OUTPUT_LEVEL BT_LOG_OUTPUT_LEVEL
 #else
-       #define _BT_LOG_OUTPUT_LEVEL _bt_log_global_output_lvl
+       /*
+        * We disallow this to make sure Babeltrace modules always
+        * have their own local log level.
+        */
+       #error No log level symbol specified: please define BT_LOG_OUTPUT_LEVEL before including this header.
 #endif
 
 /* "Tag" is a compound string that could be associated with a log message. It
index 6d09e56b57beb2c0ca44a3a9adf310be31f1fb84..4bd5014d9f1ed0016cf218d73e1df7f608f6f971 100644 (file)
 #include <stddef.h>
 #include <stdlib.h>
 #include <stdio.h>
+
+#define BT_LOG_OUTPUT_LEVEL dummy
+
 #include <babeltrace/logging-internal.h>
 #include <babeltrace/logging.h>
 
This page took 0.025034 seconds and 4 git commands to generate.