Log backends (marked as autostart) are initialized late. By default in logger thread which has the lowest priority. If log_panic() occurs earlier no logs is printed because there is no backend enabled. This patch fixes it by adding log_init() call to log_panic(). Log_init() can be called multiple times. This patch ensures that logs are printed if early panic occurs if backend is configured to auto-start. This is not the case if shell is acting as log backend. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Kconfig.template.log_config | ||
| log_backend_native_posix.c | ||
| log_backend_net.c | ||
| log_backend_rtt.c | ||
| log_backend_swo.c | ||
| log_backend_uart.c | ||
| log_cmds.c | ||
| log_core.c | ||
| log_list.c | ||
| log_list.h | ||
| log_msg.c | ||
| log_output.c | ||
| sys_log_net.c | ||
| sys_log.c | ||