diff --git a/subsys/logging/Kconfig b/subsys/logging/Kconfig index 83020b388f6..57e447f85a0 100644 --- a/subsys/logging/Kconfig +++ b/subsys/logging/Kconfig @@ -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" diff --git a/subsys/logging/log_core.c b/subsys/logging/log_core.c index 63da3896bd2..8e009808201 100644 --- a/subsys/logging/log_core.c +++ b/subsys/logging/log_core.c @@ -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);