Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TimberConfig : ApplicationConfig {
- override fun configure() {
- if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
- else Timber.plant(CrashlyticsTree())
- }
- inner class CrashlyticsTree : Timber.Tree() {
- override fun log(priority: Int, tag: String, message: String, throwable: Throwable?) {
- if (priority == Log.VERBOSE || priority == Log.DEBUG) return
- Crashlytics.log(priority, tag, message)
- throwable?.let { Crashlytics.logException(it) }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement