Hi I would like stuff from Crashlytics (including setInt, setString etc.) being reported to Logcat (via Timber, though can be directly via Log as well). During debug I would also like to prevent Crashlytics from reporting crashes to server.
I started by trying to override methods in CharlyticsCore
:
// From Crashlytics to Timber
val cc = object : CrashlyticsCore() {
override fun log(msg: String?) { Timber.tag("CrashlyticsLog").d(msg) }
override fun logException(throwable: Throwable?) { Timber.e(throwable) }
// setInt, setFloat etc. call setString
override fun setString(key: String?, value: String?) { Timber.tag(key).d(value) }
}
Fabric.with(appContext, Crashlytics.Builder().core(cc).build()
But I don't see any reports in logcat, just initialization reports:
I/CrashlyticsCore: Initializing Crashlytics Core 2.7.0.33
I/CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful
W/CrashlyticsCore: Received null settings, skipping report submission!
TimberOnlyTest online
You need to explicitly log to logcat. This is an example of my tree.
Then set it like this in your Application class onCreate
Timber.plant(DebugCrashReportingTree())