diff options
| author | MurphyZhao <[email protected]> | 2019-01-04 18:57:25 +0800 |
|---|---|---|
| committer | MurphyZhao <[email protected]> | 2019-01-04 18:59:51 +0800 |
| commit | 5ea985d0fb82cf4d46c21dab7d9ccebf4b12751d (patch) | |
| tree | 7362d730ea90773422ac41bf4b792bbac0fed108 | |
| parent | 99575c43114f144348c6caee61d2dfb66ca9b683 (diff) | |
[components][utilities/ulog] 修改 ulog_console_backend_init 从 `INIT_COMPONENT_EXPORT` 修改为 `INIT_PREV_EXPORT` 级别的自动初始化,与 ulog_init 同级
目的是为了组件初始化中的其他模块可以使用 ulog 输出日志。
Signed-off-by: MurphyZhao <[email protected]>
| -rw-r--r-- | components/utilities/ulog/backend/console_be.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/utilities/ulog/backend/console_be.c b/components/utilities/ulog/backend/console_be.c index b2ed3d565d..04b0d91add 100644 --- a/components/utilities/ulog/backend/console_be.c +++ b/components/utilities/ulog/backend/console_be.c @@ -45,12 +45,13 @@ void ulog_console_backend_output(struct ulog_backend *backend, rt_uint32_t level int ulog_console_backend_init(void) { + ulog_init(); console.output = ulog_console_backend_output; ulog_backend_register(&console, "console", RT_TRUE); return 0; } -INIT_COMPONENT_EXPORT(ulog_console_backend_init); +INIT_PREV_EXPORT(ulog_console_backend_init); #endif /* ULOG_BACKEND_USING_CONSOLE */ |
