开发者

How can I filter OUT a <tagname> using adb logcat

This is related to Filter output in logcat by tagname. How can I filter out a tagname. Ex - If I don't want the tagname GNU.IO to be echoed to stdout, I would like something which would do the equivalent of -

adb logcat | grep -v <tagname> 
开发者_运维百科

Unfortunately the above is not working for me.


logcat won't do it for you, but if you want the device to do the work, you could use adb shell:

adb shell 'logcat | grep -v <tagname>'


I found that this works well for what I wanted -

adb logcat -s TAG:V


Just set specific tag's level to S(ilent):

adb logcat <TAG>:S

as result, you'll see all messages excluding TAG

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜