From 461425eb6054f18cea1990a4117fe8c78e888ddf Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 29 May 2017 19:47:52 -0700 Subject: Add icon tabs and webview observables --- .../main/kotlin/com/pitchedapps/frost/utils/L.kt | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt') 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 -- cgit v1.2.3