Logcat revamped with the Android Studio Dolphin release
Table of Contents
Android Logcat has been revamped and updated to make it easier for developers to track and scan through the app logs. This update is one of the most significant updates since the introduction of the Logcat tool
Updated Logcat is available with the Android Studio Dolphin release. You can download the latest version of Android Studio from here: https://developer.android.com/studio. There are several improvements included in this release that are intended towards improving developers’ productivity.
Here I am going to list the top 5 features of the new Logcat from Android Studion Dolphin:
Improved Logcat Formatting
There has been a major improvement in Logcat formatting. Formatting makes it easier for scanning through the existing logs.
Example: Refer to the image below, and see each tag appears in its own unique color
Tracking logs across app crashes/restarts
Now it’s easier to track logs across app crashes and restarts. Logcat keeps track of the app process and prints helpful logs when the app process gets killed or restarted.
PROCESS ENDED and PROCESS STARTED logs are printed when the app process is killed and restarted respectively. Refer to the image below:
New query system
New Logcat has now simplified the way to add custom filters. This is done by introducing key-value searches right from the main query field. Refer to the image below:
This new query system provides accurate query results, without relying on regular expressions, as well as the ability to recall past queries from history, and share those queries with others. Here are some examples of how to use the new query system, but you can also simply start typing in the query field to see suggestions. Refer below:
Create multiple Logcat windows
You can now create multiple tabs within Logcat so that you can easily switch between different devices or queries. Additionally, to help you more easily compare two sets of logs, you can now split the view within a tab by right-clicking in the log view and selecting either Split Right or Split Down. To close a split, right-click and select Close. Each split allows you to set your own device connection, view options, and query.
Switch between view presets
Logcat now allows you to quickly switch between different view modes — Standard, Compact, and Custom. Each view mode provides a different default setting for showing logs. You can also customize each of these default view modes, as well as a custom view mode, by selecting Modify View. Refer to the image below:
I hope this would help you in getting started quickly with the new Logcat.
References:
https://developer.android.com/studio/debug/logcat