Filtering of Log Messages

Answered

Hi,

I couldn't find this functionality in Intellij Idea (nor in AppCode) and I think it would be very useful for debugging purposes. Basically - it'd be great if I can apply filter to live log console in both products. Something like 'grep' on 'tail' command i.e. 'tail -f filename | grep ERROR'. And then the console box will only show a messages that are matching the pattern.

What do you think ?

4
5 comments
Avatar
Permanently deleted user

What would be ideal is something similar to the LOGCAT viewer in Android Studio to view console log. Specifically it has the following fields:

  1. Drop down to select log level
  2. Search text with support for regexp and with search history pulldown
  3. Ability to select whether search text is treated as regexp or not
  4. Filters to select what messages get shown

Below is a screen capture from Android Studio for anyone reading who has not used Anroid Studio:

8
Avatar
Permanently deleted user

I was just looking for a quick way to do searching and filtering in the same time. So the output in the console window is only reduced to log messages matching pattern. And I agree I can always do grep - but it might be faster to do it automatically in the IDE.

5
Avatar
Permanently deleted user

If you use a logging framework and log into files you can let IDEA show those log files. Just have a log at the Run/Debug Configuration under the Log tab.

There is also a option to show ony a certain loglevel in the upper right corner and a search box which works as regular expression. Granted, it can not handle regex as far as I now but it works fine for me. As soon as it get more complicated I switch back to the shell and use grep anyways as it is more flexible.

0

Thanks for the recommendation Serge Baranov 

Grep Console is exactly what I've been missing in IntelliJ all these years 😁

0

Please sign in to leave a comment.