Unverified Commit f3288109 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge pull request #1882 from RocketChat/fix/fix-production-logger

[FIX] Don't log to console on Production builds
parents 4c9ae11a dde9698e
package chat.rocket.android.helper
import timber.log.Timber
import android.util.Log
// Production logger... Just ignore it
class CrashlyticsTree : Timber.Tree() {
override fun log(priority: Int, tag: String?, message: String, throwable: Throwable?) {
Log.println(priority, tag, message)
if (throwable != null) {
Log.e(tag,throwable.toString())
}
throwable?.printStackTrace()
}
}
......@@ -6,7 +6,7 @@ import timber.log.Timber
class CrashlyticsTree : Timber.Tree() {
override fun log(priority: Int, tag: String?, message: String, throwable: Throwable?) {
Crashlytics.log(priority, tag, message)
Crashlytics.log(message)
if (throwable != null) {
Crashlytics.logException(throwable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment