未验证 提交 c0282694 编写于 作者: O openharmony_ci 提交者: Gitee

!12318 翻译已完成 10066+10455

Merge pull request !12318 from shawn_he/10066-a
# Overview of Application Event Logging # Overview of Application Event Logging
HiAppEvent provides event logging APIs for applications to log the fault, statistical, security, and user behavior events reported during running. Based on event information, you will be able to analyze the running status of your application. The HiAppEvent module provides event logging APIs for applications to log the fault, statistical, security, and user behavior events reported during running. Based on event information, you will be able to analyze the running status of your application.
The HiAppEvent module can be used to develop application event-related functions, including flushing application events to a disk and querying historical application events. You can use this module to develop application event-related functions, including flushing application events to a disk, querying and clearing application events, and customizing application event logging configuration.
## Basic Concepts ## Basic Concepts
......
...@@ -166,7 +166,7 @@ This development guide is applicable to standard-system devices \(reference memo ...@@ -166,7 +166,7 @@ This development guide is applicable to standard-system devices \(reference memo
``` ```
#undef LOG_DOMAIN #undef LOG_DOMAIN
#undef LOG_TAG #undef LOG_TAG
#define LOG_DOMAIN 0 // Indicates the service domain. The value ranges from 0x0 to 0xFFFFF. #define LOG_DOMAIN 0xD003200 // Indicates the service domain. The value ranges from 0xD000000 to 0xFFFFF.
#define LOG_TAG "MY_TAG" #define LOG_TAG "MY_TAG"
``` ```
...@@ -195,7 +195,7 @@ This development guide is applicable to standard-system devices \(reference memo ...@@ -195,7 +195,7 @@ This development guide is applicable to standard-system devices \(reference memo
``` ```
class MyClass { class MyClass {
static constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "MY_TAG"}; static constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0xD003200, "MY_TAG"};
... ...
} }
``` ```
...@@ -204,7 +204,7 @@ This development guide is applicable to standard-system devices \(reference memo ...@@ -204,7 +204,7 @@ This development guide is applicable to standard-system devices \(reference memo
``` ```
using namespace OHOS::HiviewDFX; using namespace OHOS::HiviewDFX;
static constexpr HiLogLabel LABEL = {LOG_CORE, 0, "MY_TAG"}; static constexpr HiLogLabel LABEL = {LOG_CORE, 0xD003200, "MY_TAG"};
``` ```
Print logs. Print logs.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册