4 Star 15 Fork 9

离北况归/OpenHarmony_p7885_phone

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
hilog和console.log的区别.md 465 Bytes
一键复制 编辑 原始数据 按行查看 历史
离北况归 提交于 2024-03-19 16:59 . 3.19

从上图可以看到,日志在打印的时候,会包含4部分内容:domaid、tag、日志级别、日志内容。

hilog可以设置domaid、tag、日志级别,且hilog的domaid不需要自定义,系统当前已经定义好了。

console.log的domaid、tag、日志级别是固定的,console.log打印时,domaid为‘A0c0d0’,tag为‘JSApp’,日志级别为info。所以使用console.log打印日志,不方便日志定位

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/from-north-to-north/OpenHarmony_p7885.git
git@gitee.com:from-north-to-north/OpenHarmony_p7885.git
from-north-to-north
OpenHarmony_p7885
OpenHarmony_p7885_phone
master

搜索帮助

A270a887 8829481 3d7a4017 8829481