Skip to content

Commit ba991c3

Browse files
nordic-krchnashif
authored andcommitted
logging: Add assert when no backends defined
Added an assert in the logger thread in case there is no backends, instead of having that thread spinning forever. Disabled log in qemu_xtensa board due to lack of backends. Signed-off-by: Alberto Escolar Piedras <[email protected]> Signed-off-by: Krzysztof Chruscinski <[email protected]> Signed-off-by: Anas Nashif <[email protected]>
1 parent 7707060 commit ba991c3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

boards/xtensa/qemu_xtensa/qemu_xtensa.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ testing:
1111
ignore_tags:
1212
- net
1313
- bluetooth
14+
- logging

subsys/logging/log_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ void log_free(void *str)
668668

669669
static void log_process_thread_func(void *dummy1, void *dummy2, void *dummy3)
670670
{
671+
__ASSERT_NO_MSG(log_backend_count_get() > 0);
672+
671673
log_init();
672674
thread_set(k_current_get());
673675

0 commit comments

Comments
 (0)