How to filter logcat in Android Studio?

What I do is right click on a line I don't like and select "Fold lines like This"enter image description here


There are two ways to do this, both are in the Android tab at the bottom of the IDE (where the logcat output is displayed).

First, you can simply type something into the search box at the top and it should filter only messages containing the text you type.

Second, you can do advanced filtering by clicking on the dropdown at the top right, which should be displaying No Filters by default, and choose Edit Filter Configuration and specifying what to filter on. Using this method you also save the filters and can re-use them by selecting them in the dropdown.

Screenshot:
Search & Filter Logcat