logging: Fix LOG_LEVEL_SET() not compiling when log disabled

When log is disabled then input parameter to LOG_LEVEL_SET(level)
is not defined. It was still used, leading to compilation failure.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2019-03-21 15:55:31 +01:00 committed by Anas Nashif
commit 808cc7c436

View file

@ -415,7 +415,8 @@ char *log_strdup(const char *str);
*
*/
#define LOG_LEVEL_SET(level) \
static const u32_t __log_level __attribute__((unused)) = level
static const u32_t __log_level __attribute__((unused)) = \
_LOG_LEVEL_RESOLVE(level)
/**
* @}