【发布时间】:2023-12-23 18:04:01
【问题描述】:
我正在使用
adb -s [deviceId] logcat
将设备的日志输出打印到 cmd。但现在我想在显示的输出中添加一个 TAG 过滤器。我该怎么做?
【问题讨论】:
标签: android adb logcat android-logcat
我正在使用
adb -s [deviceId] logcat
将设备的日志输出打印到 cmd。但现在我想在显示的输出中添加一个 TAG 过滤器。我该怎么做?
【问题讨论】:
标签: android adb logcat android-logcat
使用 -s 选项。
adb logcat -s MyActivity
取自链接@How to filter Android logcat by application?
有关选项列表,请查看下面的链接
http://developer.android.com/tools/help/logcat.html
标记请查看以下链接
http://developer.android.com/reference/android/util/Log.html
【讨论】:
试试这个:
adb logcat | findstr 我的活动
findstr 在 Windows 中是“grep”。 过滤任何你想要的东西。
【讨论】: