6
I was reading the android documentation and saw that it is possible to monitor logcat by command line, without necessarily having the IDE open.
I installed a minimalist version of ADB (only what is necessary for it to work on the command line) and I’m trying to monitor application errors on my phone, to make it easier to read, I export to a text file at the command prompt, using the command below:
adb logcat >> C:\\Temp\logcat.txt
This command already meets my purpose, but it records everything that occurs on the mobile, and I would like it to be recorded only errors, and if it is possible to filter this, of running applications.
Is there any way to perform one or both of these filters per command line? I’m not sure how to apply privacy tags on the command line.
for linux users can also use pipe, something like
$ adb logcat | grep "MyActivity"
that funfa blzura– Armando Marques Sobrinho
That if I am debugging an app in specific, in case I wanted to investigate the apps running on my device, there is no way I know their activities. There’s no way to filter it?
– user28595
For what I saw in the documentation, no. Just by tag and priority level. Also because the application or activity name does not exist in the log. You can ignore the tag using
*
, for example list all entries with priority level "error" or higher:adb logcat *:E
– ramaral
I managed to use the command
adb logcat ActivityManager:I *:S >> C:\\Temp\logcat.txt
– user28595