Filtering Logcat Logs on commandline

前端 未结 6 1861
小鲜肉
小鲜肉 2021-02-01 01:59
public static final TAG = \"Legendry Eagle\";

Issue: I want to see logs of \"Legendry Eagle\" from the commandline.

I tried:

6条回答
  •  梦毁少年i
    2021-02-01 02:31

    If you only want to show logcat for a specific TAG, do it like this:

    adb logcat YourTAGHere:Priority *:S
    

    The *:S is important, as it sets all other tags to silent. If I want to track only my MainActivity tag at Verbose level, the syntax would look like this.

    adb logcat MainActivity:V *:S
    

    Edit: I found no good way of filtering out tags with spaces. LegendryEagle works fine, but I was not able to filter out Legendry Eagle

提交回复
热议问题