aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt
blob: 0151b0ae27764c6755ed52ce7cd82d71bbe07b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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: %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)
//            }
//        }
    }
}