From 81c3d7b9256988d3074dd81a7e2cf4454478a2ab Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Tue, 24 Mar 2020 14:43:44 +0100 Subject: [PATCH] logging: Fix LOG_LEVEL_SET macro LOG_LEVEL_SET was ignoring level argument and was setting default log level always. Signed-off-by: Krzysztof Chruscinski --- include/logging/log.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/logging/log.h b/include/logging/log.h index 8c329c41ecd..142fde13b51 100644 --- a/include/logging/log.h +++ b/include/logging/log.h @@ -423,9 +423,8 @@ static inline char *log_strdup(const char *str) * @param level Level used in file or in function. * */ -#define LOG_LEVEL_SET(level) \ - static const u32_t __log_level __unused = \ - _LOG_LEVEL_RESOLVE(level) +#define LOG_LEVEL_SET(level) static const u32_t __log_level __unused = \ + Z_LOG_RESOLVED_LEVEL(level, 0) /** * @}