How to disable new Logcat in Android Studio Giraffe?
Asked Answered
G

3

20

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

Goosestep answered 25/7, 2023 at 22:12 Comment(6)
This may help #73775551Claudine
Thank you @RodrigoFerreira, but the answer to this question is the solution I used before Giraffe.Goosestep
seems that awful new Logcat is no longer experimental, thus we are f**d and must adapt to itLawless
This is the shittiest update with no option to fallback to the legacy logcat. I can't even filter only DEBUG messages because the filters are Filter by DEBUG or higher which includes Warning, Info as well. I don't understand what do the teams even smoke before finalising something like this.Stigmatize
One thing that I found out that makes this more bearable is to use the "Compact View"Goosestep
I even downgraded Android Studio a few months ago because of the new logcat. Now I'm forced to upgrade to it because of a new project not supporting old versions of AS :( Now I run into this annoying logcat again, searching for a solution.Spectral
G
3

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

Goosestep answered 19/9, 2023 at 17:59 Comment(0)
C
2

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.

Cognizance answered 18/9, 2023 at 12:52 Comment(0)
S
1

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

Spectral answered 10/8, 2023 at 22:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.