faqs-dfx.md 961 字节
Newer Older
S
shawn_he 已提交
1 2
# DFX Development

S
shawn_he 已提交
3
## How do I flush HiLog information to disks?
S
shawn_he 已提交
4

S
shawn_he 已提交
5
Applicable to: OpenHarmony 3.2 Beta (API version 9) 
S
shawn_he 已提交
6

S
shawn_he 已提交
7
**Symptom**
S
shawn_he 已提交
8

S
shawn_he 已提交
9
How do I flush HiLog information to disks?
S
shawn_he 已提交
10

S
shawn_he 已提交
11
**Solution**
S
shawn_he 已提交
12

S
shawn_he 已提交
13
Run the **hilog -w start -f ckTest -l 1M -n 5 -m zlib -j 11** command.
S
shawn_he 已提交
14

S
shawn_he 已提交
15
The log file is saved in the **/data/log/hilog/** directory.
S
shawn_he 已提交
16

S
shawn_he 已提交
17
Parameter description:
S
shawn_he 已提交
18

S
shawn_he 已提交
19 20 21 22 23 24 25 26 27
```
-**-w**: Starts a log flushing task. **start** means to start the task, and **stop** means to stop the task.
-**-f**: Sets the log file name.
-**-l**: Sets the size of a single log file. The unit can be B, KB, MB, or GB.
-**-n**: Sets the maximum number of log files. When the number of log files exceeds the specified value, the earliest log file will be overwritten. The value range is [2,1000].
-**-m**: Specifies the log file compression algorithm.
-**-j**: Specifies the task ID. The value ranges from **10** to **0xffffffffff**.
For more details about parameters, run the **hilog --help** command.
```