在 linux 系统中 grep 的时候,可以指定搜索到的内容增加上下几行的上下文信息,有时经常可以在这个上下文信息中发现有价值的线索。比如: cat haystack.txt | grep -2 needle
类似的功能在 AndroidStudio 的 logcat 中如何实现呢?