[components][utilities/ulog] 修改 ulog_console_backend_init 从 `INIT_COMPONENT_EXPORT` 修改为 `INIT_PREV_EXPORT` 级别的自动初始化,与 ulog_init 同级

目的是为了组件初始化中的其他模块可以使用 ulog 输出日志。

Signed-off-by: MurphyZhao <d2014zjt@163.com>
This commit is contained in:
MurphyZhao 2019-01-04 18:57:25 +08:00
parent 99575c4311
commit 5ea985d0fb
1 changed files with 2 additions and 1 deletions

View File

@ -45,12 +45,13 @@ void ulog_console_backend_output(struct ulog_backend *backend, rt_uint32_t level
int ulog_console_backend_init(void) int ulog_console_backend_init(void)
{ {
ulog_init();
console.output = ulog_console_backend_output; console.output = ulog_console_backend_output;
ulog_backend_register(&console, "console", RT_TRUE); ulog_backend_register(&console, "console", RT_TRUE);
return 0; return 0;
} }
INIT_COMPONENT_EXPORT(ulog_console_backend_init); INIT_PREV_EXPORT(ulog_console_backend_init);
#endif /* ULOG_BACKEND_USING_CONSOLE */ #endif /* ULOG_BACKEND_USING_CONSOLE */