How to disable new Logcat in Android Studio Giraffe?

4.2k views Asked by At

I just updated to Android Studio Giraffe 2022.3.1 and the new Logcat mode has been turned on for me. This was off for me in the previous version as I opted out.

Is there a way to keep the old Logcat?

New Logcat in Android Studio

3

There are 3 answers

0
Doron Yakovlev Golani On BEST ANSWER

Bad news

I couldn't find a way to go back, and like some have written in the comments it seems like Google have decided to deprecate the good old Logcat.

Good news

Like @GuilhermeCamposHazan wrote, you can get pretty close to what we had before Android Studio Giraffe.

I currently use the "Compact Mode" mode:

Compact Mode selection

And use the following settings:

Settings

The result is that I can read longer lines and don't have all the extra information that I usually don't need from Logcat.

Result

0
DIRTY DAVE On

I despise the new logcat. It prints out so much useless logs that clutters up everything and hides the logs I actually need to debug.

enter image description here

I'm now using the Timber library to filter out all the garbage I don't care to see

implementation 'com.jakewharton.timber:timber:4.7.1'

Create custom tree class:

class CustomTagTree(private val customTag: String) : Timber.DebugTree() {

    override fun createStackElementTag(element: StackTraceElement): String {
        return customTag
    }
}

Create application class:

class BaseApplication : Application() {

    override fun onCreate() {
        super.onCreate()

        if (BuildConfig.DEBUG) {
            Timber.plant(CustomTagTree("ihatethenewlogcat"))
        }
    }
}

Add name to manifest:

<application
        android:name=".BaseApplication"

And now use

Timber.d("Called")

with a filter in the logcat tag:ihatethenewlogcat enter image description here

0
Guilherme Campos Hazan On

Its possible to almost return to the previous format. Open the logcat view, click side button "Configure Logcat Formatting Options", then "Modify views". Now unselect all options (or keep just Timestamp): Timestamp, Tag, Level, Process ID and Package Name.