From afe87be841dced15207b849494bd06e7fb01430d Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Mon, 26 Apr 2021 07:23:01 +0200 Subject: [PATCH] logging: Add mising handling of function prefix When printk is redirected to the logging it is using level 0. Level 0 was missing a define used for detection of function prefix use which lead to compilation failure when logging v2 was used with CONFIG_LOG_PRINTK=y. Signed-off-by: Krzysztof Chruscinski --- include/logging/log_core.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/logging/log_core.h b/include/logging/log_core.h index 89c2c76ebdb..ef3a8b35401 100644 --- a/include/logging/log_core.h +++ b/include/logging/log_core.h @@ -142,6 +142,7 @@ extern "C" { ) /* Set of defines that are set to 1 if function name prefix is enabled for given level. */ +#define Z_LOG_FUNC_PREFIX_0U 0 #define Z_LOG_FUNC_PREFIX_1U COND_CODE_1(CONFIG_LOG_FUNC_NAME_PREFIX_ERR, (1), (0)) #define Z_LOG_FUNC_PREFIX_2U COND_CODE_1(CONFIG_LOG_FUNC_NAME_PREFIX_WRN, (1), (0)) #define Z_LOG_FUNC_PREFIX_3U COND_CODE_1(CONFIG_LOG_FUNC_NAME_PREFIX_INF, (1), (0))