logging: Fix _LOG_LEVEL_RESOLVE macro for LOG_LEVEL case
Z_LOG_EVAL returns 1 for non-zero log level so if LOG_LEVEL was 0 with intention to disable logs in the current module Z_LOG_EVAL was jumping to the second option and was applying default logging level. Since LOG_LEVEL set to 0 should also lead to evaluation of LOG_LEVEL COND_CODE_0 is added. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
6b7c8ae1b3
commit
72ec6ce4db
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ void z_log_vprintk(const char *fmt, va_list ap);
|
|||
#define _LOG_LEVEL_RESOLVE(...) LOG_LEVEL_NONE
|
||||
#else
|
||||
#define _LOG_LEVEL_RESOLVE(...) \
|
||||
Z_LOG_EVAL(LOG_LEVEL, \
|
||||
Z_LOG_EVAL(COND_CODE_0(LOG_LEVEL, (1), (LOG_LEVEL)), \
|
||||
(GET_ARG_N(2, __VA_ARGS__, LOG_LEVEL)), \
|
||||
(GET_ARG_N(2, __VA_ARGS__, CONFIG_LOG_DEFAULT_LEVEL)))
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue