Reputation: 3181
According to documentation https://developer.android.com/studio/command-line/logcat.html logcat should support the option:
-e <expr>, --regex=<expr> Only print lines where the log message matches <expr> where <expr> is a regular expression.
However I cannot run logcat with this option:
$ ./adb logcat --regex="Vocabulary"
unknown option -- -Unrecognized Option
$ ./adb logcat -e "Vocabulary"
unknown option -- eUnrecognized Option
What am I missing?
Upvotes: 2
Views: 7482
Reputation: 2742
It happen because your device not support it,
Please run this:
adb shell logcat --help
And please search something like this:
-e <expr>, --regex=<expr>
Only print lines where the log message matches <expr>
where <expr> is a regular expression
if not, your device not support regular expressions.
Possible solution:
adb logcat | grep -e 'xxx'
Upvotes: 6
Reputation: 137
adb logcat regex will not work on TAG's. So check word "Vocabulary" is a TAG. and If you want search with TAG's use:
adb logcat -s TAG.
Upvotes: 1