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?
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?
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.
Like @GuilhermeCamposHazan wrote, you can get pretty close to what we had before Android Studio Giraffe.
I currently use the "Compact Mode" mode:
And use the following 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.
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.
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.
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")
© 2022 - 2024 — McMap. All rights reserved.
DEBUG
messages because the filters areFilter 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