Skip to content

Commit

Permalink
Merge pull request romellfudi#85 from romellfudi/logCat
Browse files Browse the repository at this point in the history
custom_logcat
  • Loading branch information
romellfudi authored May 24, 2021
2 parents 83e12e5 + efa32cd commit 6f2b851
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app-kotlin/src/main/java/com/romellfudi/ussd/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ class App : Application() {
super.onCreate()
if (BuildConfig.DEBUG) {
L.DBG = true
Timber.plant(Timber.DebugTree())
Timber.plant(object : Timber.DebugTree(){
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
super.log(priority, "timber_tag_$tag", message, t)
}

override fun createStackElementTag(element: StackTraceElement): String? {
return String.format(
"%s:%s",
element.methodName,
element.lineNumber,
super.createStackElementTag(element))
}
})
}
startKoin {
printLogger()
Expand Down

0 comments on commit 6f2b851

Please sign in to comment.