I want to capture logs and dump them into a text file, I am using a perl script to do this. The issue I am running into is that I want to include only certain tags in my logcat command.
I am using
$adbcommand_logcat = "start \"Android-Logcat\" cmd /c \"adb -s $sno logcat -s ^(?=.*?\babc\b)(?=.*?\bxyz\b)(?=.*?\bpqr\b).*$ | -v threadtime | tee ".$mainlog_filename."\"";
but this gives me a blank log instead of the log with tags specified in the regex. If I take out -s after logcat then the regex does not works and log includes everything.
Any help is appreciated.
I got it to work using the following command with egrep.If you don’t have the tag try to find the process name and use it instead.