No option performs a blocking read and keeps printing.
-x --exit
Performs a non-blocking read and exits when all logs in buffer are printed.
-a <n>, --head=<n>
Show n lines logs on head of buffer.
-z <n>, --tail=<n>
Show n lines logs on tail of buffer.
复制代码
查看日志缓冲区大小。
hilog -g
复制代码
使用样例:
$ hilog -g
Log type app buffer size is 16.0M
Log type init buffer size is 16.0M
Log type core buffer size is 16.0M
Log type only_prerelease buffer size is 16.0M
复制代码
修改日志缓冲区大小。
hilog -G size
复制代码
使用样例:
$ hilog -G 16M
Set log type app buffer size to 16.0M successfully
Set log type init buffer size to 16.0M successfully
Set log type core buffer size to 16.0M successfully
Set log type only_prerelease buffer size to 16.0M successfully
复制代码
历程流控开关。
hilog -Q pidon/pidoff
复制代码
使用样例:
$ hilog -G 16M
Set log type app buffer size to 16.0M successfully
Set log type init buffer size to 16.0M successfully
Set log type core buffer size to 16.0M successfully
Set log type only_prerelease buffer size to 16.0M successfully
复制代码
domain流控开关。
hilog -Q pidon/pidoff
复制代码
使用样例:
$ hilog -Q pidon
Set flow control by process to enabled successfully
$
$ hilog -Q pidoff
Set flow control by process to disabled successfully
复制代码
查看指定级别日志。
hilog -L D/I/W/E/F
复制代码
使用样例:
$ hilog -L E
08-28 09:01:25.730 2678 2678 E A00F00/com.huawei.hmos.aidataservice/AiDataService_5.10.7.320: DataChangeNotifyManager: notifyDataChange CommonEntity no valid entity to notify
08-28 09:01:56.058 8560 8560 E A00500/com.ohos.settingsdata/SettingsData: DB not ready request = datashare:///com.ohos.settingsdata/entry/settingsdata/SETTINGSDATA?Proxy=true&key=analysis_service_switch_on , retry after DB startup
08-28 09:01:56.082 8560 8560 E A00500/com.ohos.settingsdata/SettingsData: clearXml failed:No such file or directory, error code:13900002
08-28 09:01:56.083 8560 8560 E A00500/com.ohos.settingsdata/SettingsData: readText failed:No such file or directory, error code:13900002
08-28 09:01:56.371 8586 8586 E A00500/com.ohos.settingsdata/SettingsData: DB not ready request = datashare:///com.ohos.settingsdata/entry/settingsdata/SETTINGSDATA?Proxy=true&key=photo_network_connection_status , retry after DB startup
08-28 10:19:23.999 618 17580 I C02D10/hiview/CpuCollector: CollectProcessCpuStatInfos: collect process cpu statistics information size=234, isNeedUpdate=1
08-28 10:19:24.002 618 17580 W C01650/hiview/Rdb: DB :
08-28 10:19:24.002 618 17580 W C01650/hiview/Rdb: device: 12583051 inode: 40230 mode: 432 size: 569344 natime: Wed Aug 28 00:00:06 2024
08-28 10:19:24.002 618 17580 W C01650/hiview/Rdb: smtime: Wed Aug 28 00:34:30 2024
08-28 10:19:24.002 618 17580 W C01650/hiview/Rdb: sctime: Wed Aug 28 00:34:30 2024