HiLog is the module of OpenHarmony that logs information such as user operations and system running status for the system framework, services, and applications.
Figure 1 Architecture of the HiLog module
User-space processes write logs to the ring buffer of hilogd through the log API. hilogd sends logs to the console for viewing or writes logs to the flash at the request of the hilog.
The details are as follows:
Supported functions:
/base/hiviewdfx/hilog
├── frameworks # Framework code
│ └── native # HiLog Native implementation code
├── interfaces # APIs
│ └── native # External C/C++ APIs
│ └── innerkits # Header files opened to internal subsystems
│ └── kits # Header files opened to applications
│ └── js # External js APIs
├── services
│ └── hilogd # HiLog resident service implementation
│ └── hilogtool # HiLog tool implementation
Clang 8.0.0 or later is required.
Table 1 Major APIs of HiLog
Constructs a log label, including the log type, domain, and tag. |
||
Run the hilog | grep "MY_TAG" command in shell mode.
Output in debug mode:
01-26 11:01:06.870 1051 1051 W 00201/test: Failed to visit [https://gitee.com/openharmony](https://gitee.com/openharmony), reason:503.
Output in release mode:
01-26 11:01:06.870 1051 1051 W 00201/test: Failed to visit <private>, reason:503.
hiviewdfx_hilog
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.