From 5ea985d0fb82cf4d46c21dab7d9ccebf4b12751d Mon Sep 17 00:00:00 2001 From: MurphyZhao Date: Fri, 4 Jan 2019 18:57:25 +0800 Subject: [PATCH] =?UTF-8?q?[components][utilities/ulog]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20ulog=5Fconsole=5Fbackend=5Finit=20=E4=BB=8E=20`INIT?= =?UTF-8?q?=5FCOMPONENT=5FEXPORT`=20=E4=BF=AE=E6=94=B9=E4=B8=BA=20`INIT=5F?= =?UTF-8?q?PREV=5FEXPORT`=20=E7=BA=A7=E5=88=AB=E7=9A=84=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=EF=BC=8C=E4=B8=8E=20ulog=5Finit=20?= =?UTF-8?q?=E5=90=8C=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 目的是为了组件初始化中的其他模块可以使用 ulog 输出日志。 Signed-off-by: MurphyZhao --- components/utilities/ulog/backend/console_be.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- GitLab