aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/moe/yuuta/workmode/App.kt
blob: 57526b3d574a7078857ac7bebbceeb013779c63a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package moe.yuuta.workmode

import android.app.Application
import com.elvishew.xlog.XLog

class App : Application() {
    override fun onCreate() {
        super.onCreate()
        Setup.initLogs(Setup.getLogsPath(this).absolutePath)
        Setup.initFabric(this)

        val handler = Thread.getDefaultUncaughtExceptionHandler()
        Thread.setDefaultUncaughtExceptionHandler { t, e ->
            XLog.tag("App").build()
                    .e("***Crashed", e)
            handler.uncaughtException(t, e)
        }
    }
}