logcat是android中的一个命令行工具,可以用于得到程序的log信息,使用adb查看log时,中文容易出现乱码,提前先执行CHCP 65001设置一下UTF-8编码。
以下是adb logcat的帮助信息
输入adb logcat –help
Usage: logcat [options] [filterspecs]
options include:
-s Set default filter to silent.
Like specifying filterspec '*:s'
-f <filename> Log to file. Default to stdout
-r [<kbytes>] Rotate log every kbytes. (16 if unspecified). Requires -f
-n <count> Sets max number of rotated logs to <count>, default 4
-v <format> Sets the log print format, where <format> is one of:
brief process tag thread raw time threadtime long
-c clear (flush) the entire