在CMD中使用adb logcat时,有没有办法让日志只显示我写入日志的字符串,而不是标记以及随机数?例如,现在它说:
" D / MainActivity(970):myString"
我只想说myString,其中myString是我想记录的内容。
答案 0 :(得分:1)
日志记录格式是固定的。保存到日志中的每条记录都将包含所有字段。但您可以控制打印出哪些字段:
-v <format> Sets the log print format, where <format> is:
--format=<format>
brief color epoch long monotonic printable process raw
tag thread threadtime time uid usec UTC year zone
raw
是您要查找的格式
adb logcat -v raw