1 |
hilog grep "C02800" |
抓取含有 C02800 字符的日志 |
08-05 17:08:32.754 256 762 E C02800... |
2 |
hilog -w start -f "mylog" -l 1M -m zlib -n 10 |
执行名字为hilog的落盘任务,10个落盘文件进行轮转,单个文件落盘大小为1M,采用zlib压缩算法。<br>type、level、domain、tag支持排除查询,排除查询可以使用以"^"开头的参数和分隔符",""."来完成 |
Persist task [jobid:1] start successfully |
3 |
hilog -w query -j 1 |
指定jobid查询 |
1 init,core,app zlib /data/log/hilog/mylog 1.0M 10 |
4 |
hilog -w query |
查询全部落盘任务 |
1 init,core,app zlib /data/log/hilog/mylog 1.0M 10 |
5 |
hilog -w stop |
停止落盘任务 |
Persist task [jobid:1] stop successfully |
6 |
hilog -w start -f "mylog" |
启动落盘任务 |
Persist task [jobid:1] start successfully |
7 |
hilog -t ^core |
app 排除core和app类型的日志,可以与其他参数一起使用。 |
Invalid log type, the valid log types include app/core/init/kmsg [CODE: -3] |
8 |
hilog -t core |
打印core类型的日志,可以与其他参数一起使用。 |
08-05 17:56:05.319... |
9 |
hilog -t app -a 3 |
只显示前3行日志 |
08-05 17:00:09.212 0 0 I A00000/hilog: ========Zeroth log of type: app<br>08-05 17:00:16.482 977 977 I A0001a/SystemUI_Default: ... <br>08-05 17:00:16.574 977 977 I A0001a/SystemUI_Default: ... |
10 |
hilog -t app -z 3 |
只显示后3行日志 |
08-05 17:58:00.015 977 977 I A0002a/ScreenLock_Default: EventManagerSc...<br>08-05 17:58:00.040 977 977 I A0001a/SystemUI_Default: EventManager... <br>08-05 17:58:00.043 977 977 I A0002a/ScreenLock_Default: ... |
11 |
hilog -t app -s |
查询统计信息,需配合-t或-D使用 |
Statistic info query failed<br>Statistic feature is not enable, please set param persist.sys.hilog.stats true to enable it, |
12 |
hilog -t app -S |
清除统计信息,需配合-t或-D使用 |
Statistic info clear successfully |
13 |
hilog -t app -r |
清除buffer日志,配合-t指定某一类型使用,默认app和core |
Log type app buffer clear successfully |
14 |
hilog -g -t app |
查询日志类型为app的buffer大小。 |
Log type app buffer size is 256.0K |
15 |
hilog -g -t core |
查询core模块的buffer |
Log type core buffer size is 256.0K |
16 |
hilog -g |
查询 app, init, core的 buffer |
Log type app buffer size is 256.0K<br>Log type init buffer size is 256.0K <br>Log type core buffer size is 256.0K |
17 |
hilog -G 2M -t core |
设置buffer大小为2M,日志类型为core |
None |
18 |
hilog -t app -G 2M |
设置app模块的buffer |
Set log type app buffer size to 2.0M successfully |
19 |
hilog -t app -g |
查询app模块的buffer |
Log type app buffer size is 2.0M |
20 |
hilog -t init -T ^MMIClient |
type、level、domain、tag支持排除查询,排除查询可以使用以"^“开头的参数和分隔符”,"来完成 " |
08-05 17:00:09.212 0 0 I I00000/hilog:... |
21 |
hilog -D 0xD002220 |
指定 0xD002220 dmain的日志 |
08-05 17:14:51.055 468 1797 D C02220/... |
22 |
hilog -b D -D 0xD002220 |
指定0xD002220 domain 的 DEBUG日志查询 |
Set domain 0xd002220 log level to D successfully |
23 |
hilog -t app |
指定domian查询,可以与其他参数一起使用 |
08-05 17:19:07.587 1082 1082 I A0001b/Launcher_Default:... |
24 |
hilog -L I |
指定level查询<br>指定日志级别,hilog中定义了DEBUG、INFO、WARN、ERROR、FATAL五种日志级别 |
08-05 18:16:19.461 2675 2675 I C01800/ ... |
25 |
hilog -t app -L I |
指定日志级别level查询 |
08-05 18:13:00.040 977 977 I A0002a/ScreenLock_Default ... |
26 |
hilog -T MMIClient |
指定日志标签tag查询 |
08-05 18:15:06.994 256 762 E C02800/MMIClient... |
27 |
hilog -t core -T MMIClient |
指定日志标签tag和模块查询, -T可以与其他参数一起使用 |
08-05 18:15:59.106 256 762 E C02800/MMIClient... |
28 |
hilog -t kmsg |
指定kmsg模块查询 |
08-05 18:08:15.374 11,16269,4092503320... |
29 |
hilog -t app -x |
非阻塞式实时查询app模块 |
08-05 18:00:23.547 977 977 I A0002a/ScreenLock_Default... |
30 |
hilog -b X |
关闭一切DEBUG和INFO 日志 |
Set global log level to X successfully |