New in IntelliJ IDEA 11: Improved filtering in Android logcat
In IntelliJ IDEA 11 we’ve improved Android logcat view, so now watching the logs of your applications became much more convenient.
First, you can create your own named filters and switch between them:
You can use regular expressions to filter the log, e.g. by a tag or message text. Note that autocompletion of tags already presented in the log is available:
Another noteworthy improvement is that multiline messages aren’t cut anymore when you filter them by a named filter or using search. For example, if you search for “ActivityThread.java”, you’ll see full stacktrace containing the query, but not just separate lines:
Comments below can no longer be edited.
RockPiLP says:
November 30, 2011This is really great, and matches (perhaps even improves on) the Android logcat in Eclipse.
One area that I think is unclear is how the PID should be used. Would it be possible to have a checkbox to restrict logcat output to the PID of the process that the app being developed is running as? That would be more convenient than having to edit the filter each time the process is relaunched to match the PID.
sos says:
November 30, 2011Newest DDMS has the ability to filter by application name, it’s incredible useful.
Arno.Nyhm says:
November 30, 2011i would like to see this filter and/or a highlighter (with regex) for the normal console view
Torsten says:
March 1, 2012Can I combine LogTag and LogMessage, e.g.:
LogTag
LogMessage ERROR
This should give me all myTags Plus the error messages?
Is that possible?
Eugene Kudelevsky says:
March 1, 2012@Torsten, If I understand correctly, no, now it is impossible. If you have any idea how we can support it (for example, choosing several filters in the view), please file an issue in our tracker
Torsten says:
March 2, 2012@Eugene
Thanks, being able to mark several would be the desired result. It seems not to work until now, but is a real minor issue for me.
Just wanted to see if it is already in the program.
Tim says:
December 5, 2012*Really* needs a way to filter by package or a way to filter by this PID. Using the raw PID numbers is kind of useless.
Dirk Jäckel says:
December 10, 2012What kind of regexes are allowed?
How would I make a filter that does NOT show the following tags: GPSD, libsecgps and BatteryService
Just as an example.
Heiko W. Rupp says:
December 23, 2012@Dirk did you find a solution for that negation?
Martin Krischik says:
April 29, 2013I too would like a negative filter. Especially now that the programmers of Jelly Bean garbage collector forgot of there «DEBUG/dalvikvm(23859): GC_CONCURRENT» message — which logs about twice a second.
Martin Krischik says:
April 29, 2013Well, found a solution:
{{{
^(?!.*(dalvikvm|Email)).*$
}}}
will remove messages from dalvikvm and Email.
AoH.n says:
May 16, 2013Martin I’d reach through this computer and hug you if it was possible. I added some more concrete strings to exclude in your regex and now I can actually follow multiple runs of my program. Headache reduced.
César says:
July 8, 2016Hi guys!
Is there any way to add all filter logcats created to an IntelliJ plugin?
Problem with all configurations related to a project is that whenever we change projects we lose some of them. I would like to keep all saved logcats through a plugin.
Thanks in advance!