Feat(Logger): Support persistent logging

This commit is contained in:
2024-08-16 14:39:36 +08:00
parent 3a6fb2a6f0
commit 4ba02420ed
5 changed files with 96 additions and 4 deletions

View File

@@ -2,11 +2,19 @@ package top.fatweb.oxygen.toolbox
import android.app.Application
import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber
import top.fatweb.oxygen.toolbox.repository.userdata.UserDataRepository
import top.fatweb.oxygen.toolbox.util.OxygenLogTree
import javax.inject.Inject
@HiltAndroidApp
class OxygenApplication : Application() {
@Inject
lateinit var userDataRepository: UserDataRepository
override fun onCreate() {
super.onCreate()
Timber.plant(if (BuildConfig.DEBUG) Timber.DebugTree() else OxygenLogTree(this))
}
}