First of all android studio itself creates the required filtering for logcat based on “debuggable” applications. So if you are indeed in possession of a debug-apk then when this application runs, android studio creates a filter for this particular application which you can choose from the filter in the top right corner of the debug/console window. There are by default 3 options there while running a debug application.
1 show only selected application
2 No filters
3 edit filter configurations
You can add custom filters by clicking on edit filter configurations
.
On the Top left side of the console/debug window you can see 2 drop downs, one for you to choose which application to show logs for (when show only selected application
option is selected ofc), the other to choose the device. If there are no debuggable applications the drop down says no debuggable application, at that time the logcat will be shown for all apps.
Android by default will be logging from all applications, that’s the reason why you have different levels of logging so that the level of logging required for building and debugging an application is not compiled into the release version of the application.
You can get more info on logging levels here. For example the Log.d
doesn’t get compiled and packaged to release apk but Log.e
does. So be sure to use the proper levels of logging in your application and create proper filters for looking through the logcat
2
solved Android Logcat logging everything