CrashlyticsTree.kt 370 Bytes
Newer Older
1 2 3 4 5 6 7
package chat.rocket.android.helper

import com.crashlytics.android.Crashlytics
import timber.log.Timber

class CrashlyticsTree : Timber.Tree() {

8
    override fun log(priority: Int, tag: String?, message: String, throwable: Throwable?) {
9
        Crashlytics.log(message)
10 11 12 13 14 15

        if (throwable != null) {
            Crashlytics.logException(throwable)
        }
    }
}