# HiAppEvent - [Introduction](#section11660541593) - [Directory Structure](#section161941989596) - [Compilation and Building](#section137768191623) - [Usage](#section1312121216216) - [Available APIs](#section1551164914237) - [How to Use](#section129654513264) - [Repositories Involved](#section1371113476307) ## Introduction HiAppEvent is an OpenHarmony module that provides the event logging function 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 applications. Figure 1 HiAppEvent architecture ![](figures/HiAppEvent-architecture.png "HiAppEvent-architecture") ## Directory Structure ``` /base/hiviewdfx/hiappevent # HiAppEvent source code ├── frameworks # Framework code │ └── native # Native implementation code of logging APIs ├── interfaces # External APIs │ └── js # JS APIs │ └── innerkits # JS API implementation code │ └── napi # JS APIs implemented based on NAPI ├── test # Test cases ``` ## Compilation and Building Use Clang 8.0.0 and C++11 or higher. ## Usage ### Available APIs #### JS APIs Table 1 JS APIs for event logging
Module | API | Description |
hiAppEvent | configure(config: ConfigOption): boolean | Sets the configuration options for application event logging. Input arguments:
|
API | Return Value | Description |
OH_HiAppEvent_Write(const char* domain, const char* name, enum EventType type, const ParamList list) | int | Implements logging of application events. Input arguments:
|
API | Return Value | Description |
OH_HiAppEvent_Configure(const char* name, const char* value) | bool | Sets the configuration options for application event logging. Input arguments:
|