diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt index 279d595e..0151b0ae 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt @@ -1,12 +1,34 @@ package com.pitchedapps.frost.utils +import android.util.Log +import timber.log.Timber + + + /** * Created by Allan Wang on 2017-05-28. */ class L { companion object { - val TAG = "Frost" - fun e(s: String) = android.util.Log.e(com.pitchedapps.frost.utils.L.Companion.TAG, s) - fun d(s: String) = android.util.Log.d(com.pitchedapps.frost.utils.L.Companion.TAG, s) + val TAG = "Frost: %s" + fun e(s: String) = Timber.e(TAG, s) + fun d(s: String) = Timber.d(TAG, s) + } +} + +internal class CrashReportingTree : Timber.Tree() { + override fun log(priority: Int, tag: String, message: String, t: Throwable?) { + if (priority == Log.VERBOSE || priority == Log.DEBUG) + return + Log.println(priority, tag, message) +// FakeCrashLibrary.log(priority, tag, message) + +// if (t != null) { +// if (priority == Log.ERROR) { +// FakeCrashLibrary.logError(t) +// } else if (priority == Log.WARN) { +// FakeCrashLibrary.logWarning(t) +// } +// } } }
\ No newline at end of file |