Commit a3e39cb0 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Carles Cufi
Browse files

logging: make CONFIG_LOG_ALWAYS_RUNTIME build check less ambiguous



When these fails the compiler just prints "Option must be enabled" with
no reference to what option, so one has to look at the code to find out.
Mention the actual option in the error to make these unambiguous.

Signed-off-by: default avatarFabio Baltieri <fabiobaltieri@google.com>
parent 5a727a38
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -65,9 +65,11 @@ LOG_MODULE_REGISTER(log);

#ifndef CONFIG_LOG_ALWAYS_RUNTIME
BUILD_ASSERT(!IS_ENABLED(CONFIG_NO_OPTIMIZATIONS),
	     "Option must be enabled when CONFIG_NO_OPTIMIZATIONS is set");
	     "CONFIG_LOG_ALWAYS_RUNTIME must be enabled when "
	     "CONFIG_NO_OPTIMIZATIONS is set");
BUILD_ASSERT(!IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE),
	     "Option must be enabled when CONFIG_LOG_MODE_IMMEDIATE is set");
	     "CONFIG_LOG_ALWAYS_RUNTIME must be enabled when "
	     "CONFIG_LOG_MODE_IMMEDIATE is set");
#endif

static const log_format_func_t format_table[] = {