Filtering LogCat in ACRA by application and not using TAG

360 Views Asked by At

I am currently using ACRA for capturing errors and improving my application. I would like to filter in Logcat all logs generated due to my application running which includes not only those that my app generates, but also those that are generated by libraries used by app (like GooglePlay).

Usually what I have seen suggested is filtering by TAG, but that will not allow me to see logs that I have not tagged (like, for instance, ACRA... )

There is a solution in eclipse where I can filter both using TAGs but also by Application name and/or its process ID. That's what I would like to do, filter by my application name the logcat output sent to ACRA.

I would like to use a command in logcat to reproduce the following option I select in eclipse:

Filtering in Logcat by App

Finally the question is at logcat level. Is possible to filter logcat at adb level using a filter by application and not by TAG

Is the only option to have a single TAG for all the application Logs? Another way around I have is to filter "all TAG starting by xxxx", but I have not found any example in google, not using "*".

Any solution using Linux shell (like grep) is not workable, I already tested it as the way the information is passed by ACRA.

1

There are 1 best solutions below

3
On

Trebia,

The tricky part of your request is "adb logcat" spits out PID. The only way I know of to filter by application name is to write a script to query the OS via "ps" to look up the PID. I am not aware of any way to do that within eclipse with out editing the logcat plugin yourself.

If you are using a Mac and you are willing to do the filter outside of eclipse you should try LogRabbit. It can filter by application name or just about any thing else you would need to filter by. In addition to a rich filter creator your saved filters are just one click away for real-time filtering.

You can find more information here: http://lograbbit.com/

Full disclosure I am the creator of LogRabbit.