通过adb命令打印log

时间:2023-03-09 15:26:41
通过adb命令打印log

1、adb logcat           --打印当前设备上所有日志

2、adb logcat | findstr ***   --过滤仅含***的日志

3、adb logcat *:W        --过滤打印严重级别W及以上的日志

4、adb logcat | findstr *** > F:\log.txt    --把仅含***的日志保存到F盘的log.txt文件中

5、adb logcat -c           -- 清除屏幕上的日志记录

6、adb logcat -c && adb logcat -s ActivityManager | grep "Displayed”    --客户端程序启动时间获取