如何在没有标签的情况下过滤终端中的 logcat 条消息?

How do I filter logcat messages in the terminal without a tag?

Android工作室的logcat无法使用;它进进出出,很少在重启时显示消息,所以我开始在我的终端上使用 adb logcat 。阅读 http://developer.android.com/tools/debugging/debugging-log.html 给出了使用标签过滤的例子。如果我不知道标签,但想用我知道的错误子字符串显示所有错误怎么办?

您总是可以简单地将 logcat 传送到 grep:

$ adb logcat | grep 'known error substring'

如果您使用 Windows,请改用 find

C:\> adb logcat | find 'known error substring'

您可以尝试 pidcat(作者 Jake Wharton)。

正如作者所说"colored logcat script which only shows log entries for a specific application package"

如果你在windows,你可以clic on left upper corner > Edit > Search然后引入你知道的子串。

很可能 Linux 的终端具有相同的功能,但我不知道如何访问它。