log_core: Add Kconfig symbol for init priority

Users may want to do some configuration after the kernel is up, but
before initializing the log_core. Making the log_core's init priority
configurable makes that possible.

Signed-off-by: Ian Oliver <io@amperecomputing.com>
This commit is contained in:
Ian Oliver 2022-12-06 15:31:46 -08:00 committed by Carles Cufí
parent 5102950adc
commit 1675d49b4c
2 changed files with 6 additions and 1 deletions

View file

@ -12,6 +12,11 @@ config LOG
if LOG
config LOG_CORE_INIT_PRIORITY
int "Log Core Initialization Priority"
range 0 99
default 0
rsource "Kconfig.mode"
rsource "Kconfig.filtering"

View file

@ -907,4 +907,4 @@ static int enable_logger(const struct device *arg)
return 0;
}
SYS_INIT(enable_logger, POST_KERNEL, 0);
SYS_INIT(enable_logger, POST_KERNEL, CONFIG_LOG_CORE_INIT_PRIORITY);