From 4c1382d43169949b0384e5969240f820d074dc32 Mon Sep 17 00:00:00 2001 From: liuyifei Date: Sat, 21 Jun 2025 08:37:11 +0000 Subject: [PATCH] =?UTF-8?q?hilog=E8=B5=84=E6=96=99=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyifei --- zh-cn/application-dev/dfx/hilog-guidelines-arkts.md | 2 ++ zh-cn/application-dev/dfx/hilog-guidelines-ndk.md | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/dfx/hilog-guidelines-arkts.md b/zh-cn/application-dev/dfx/hilog-guidelines-arkts.md index 4b00486d88a..1b49d06a29d 100644 --- a/zh-cn/application-dev/dfx/hilog-guidelines-arkts.md +++ b/zh-cn/application-dev/dfx/hilog-guidelines-arkts.md @@ -153,12 +153,14 @@ HiLog中定义了DEBUG、INFO、WARN、ERROR、FATAL五种日志级别,并提 5. 在DevEco Studio的底部,切换到“Log”窗口,设置日志的过滤条件。 选择当前的设备及进程,日志级别选择Verbose,搜索内容设置为“testTag”。此时窗口仅显示符合条件的日志。 + 打印日志结果为: ```txt 01-02 08:18:24.947 30988-30988 A0ff00/testTag com.example.hilogemo I hello World 3 01-02 08:18:24.947 30988-30988 A0ff00/testTag com.example.hilogemo I peter is {"name":"peter","age":15} 01-02 08:18:24.947 30988-30988 A00000/testTag com.example.hilogemo E this is an error level log ``` + \ No newline at end of file diff --git a/zh-cn/application-dev/dfx/hilog-guidelines-ndk.md b/zh-cn/application-dev/dfx/hilog-guidelines-ndk.md index 7e3d43a9b2c..2afca4b4e16 100644 --- a/zh-cn/application-dev/dfx/hilog-guidelines-ndk.md +++ b/zh-cn/application-dev/dfx/hilog-guidelines-ndk.md @@ -105,10 +105,12 @@ HiLog中定义了DEBUG、INFO、WARN、ERROR、FATAL五种日志级别,并提 4. 输出结果: + ``` - 01-02 08:39:38.915 9012-9012 A03200/MY_TAG pid-9012 I Failed to visit , reason:11. - 01-02 08:39:38.915 9012-9012 A03200/MY_TAG pid-9012 E this is an info level log + 01-02 08:39:38.915 9012-9012 A03200/MY_TAG com.example.hilogemo I Failed to visit , reason:11. + 01-02 08:39:38.915 9012-9012 A03200/MY_TAG com.example.hilogemo E this is an info level log ``` + ### 日志回调接口使用示例 -- Gitee