logging: Add configurable logging thread delay

This patch adds confiugurable delay when starting log processing
thread.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
Emil Obalski 2021-08-13 15:56:51 +02:00 committed by Christopher Friedt
commit 6f4f1dc230
3 changed files with 14 additions and 1 deletions

View file

@ -1271,7 +1271,10 @@ static int enable_logger(const struct device *arg)
k_thread_create(&logging_thread, logging_stack,
K_KERNEL_STACK_SIZEOF(logging_stack),
log_process_thread_func, NULL, NULL, NULL,
K_LOWEST_APPLICATION_THREAD_PRIO, 0, K_NO_WAIT);
K_LOWEST_APPLICATION_THREAD_PRIO, 0,
COND_CODE_1(CONFIG_LOG_PROCESS_THREAD,
K_MSEC(CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS),
K_NO_WAIT));
k_thread_name_set(&logging_thread, "logging");
} else {
log_init();