Skip to content

Commit

Permalink
logging: fix msg2 creation in __LOG_VA
Browse files Browse the repository at this point in the history
This commit fixes invoking of z_log_msg2_runtime_vcreate with wrong
param. This function requires to be called with dynamic or static
source based on CONFIG_LOG_RUNTIME_FILTERING.

Signed-off-by: Przemyslaw Bida <[email protected]>
  • Loading branch information
canisLupus1313 authored and carlescufi committed Mar 15, 2022
1 parent 09d2199 commit 5c94549
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/logging/log_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,9 @@ __syscall void z_log_hexdump_from_user(uint32_t src_level_val,
break; \
} \
if (IS_ENABLED(CONFIG_LOG2)) { \
z_log_msg2_runtime_vcreate(CONFIG_LOG_DOMAIN_ID, _source, \
void *_src = IS_ENABLED(CONFIG_LOG_RUNTIME_FILTERING) ? \
(void *)_dsource : (void *)_source; \
z_log_msg2_runtime_vcreate(CONFIG_LOG_DOMAIN_ID, _src, \
_level, NULL, 0, 0, _str, _valist); \
break; \
} \
Expand Down

0 comments on commit 5c94549

Please sign in to comment.