logging: abstract log_core_init()

Similar to how LOG_INIT(), LOG_PANIC(), etc are
wrapped.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-09-22 16:49:45 -07:00 committed by Anas Nashif
parent 56650aff7e
commit 144f2cb2b3
2 changed files with 3 additions and 3 deletions

View file

@ -170,10 +170,12 @@ void log_backend_enable(struct log_backend const *const backend,
void log_backend_disable(struct log_backend const *const backend);
#if defined(CONFIG_LOG)
#define LOG_CORE_INIT() log_core_init()
#define LOG_INIT() log_init()
#define LOG_PANIC() log_panic()
#define LOG_PROCESS() log_process(false)
#else
#define LOG_CORE_INIT() do { } while (false)
#define LOG_INIT() 0
#define LOG_PANIC() /* Empty */
#define LOG_PROCESS() false

View file

@ -481,9 +481,7 @@ FUNC_NORETURN void z_cstart(void)
/* gcov hook needed to get the coverage report.*/
gcov_static_init();
if (IS_ENABLED(CONFIG_LOG)) {
log_core_init();
}
LOG_CORE_INIT();
/* perform any architecture-specific initialization */
z_arch_kernel_init();