From: Philippe Proulx Date: Wed, 31 May 2017 14:42:33 +0000 (-0400) Subject: Logging: require modules to define BT_LOG_OUTPUT_LEVEL X-Git-Tag: v2.0.0-pre1~113 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=00a52b397a7bd98b21ea09643abbba91cbb1e2ae Logging: require modules to define BT_LOG_OUTPUT_LEVEL Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/include/babeltrace/logging-internal.h b/include/babeltrace/logging-internal.h index e9ce365e..8805306e 100644 --- a/include/babeltrace/logging-internal.h +++ b/include/babeltrace/logging-internal.h @@ -156,7 +156,11 @@ #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 diff --git a/logging/log.c b/logging/log.c index 6d09e56b..4bd5014d 100644 --- a/logging/log.c +++ b/logging/log.c @@ -291,6 +291,9 @@ #include #include #include + +#define BT_LOG_OUTPUT_LEVEL dummy + #include #include