Skip to content

Commit

Permalink
#178 [feat] App -> HousApp 네이밍 변경 및 Timber 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Aug 11, 2022
1 parent abf40f9 commit c6a7409
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".App"
android:name=".HousApp"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/com/hous/hous_aos/App.kt

This file was deleted.

14 changes: 14 additions & 0 deletions app/src/main/java/com/hous/hous_aos/HousApp.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.hous.hous_aos

import android.app.Application
import com.hous.hous_aos.util.TimberDebugTree
import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber

@HiltAndroidApp
class HousApp : Application() {
override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) Timber.plant(TimberDebugTree())
}
}
12 changes: 12 additions & 0 deletions app/src/main/java/com/hous/hous_aos/util/TimberDebugTree.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.hous.hous_aos.util

import timber.log.Timber

/**
* DebugTree를 상속받아 더 자세한 Log남기기*/
class TimberDebugTree : Timber.DebugTree() {

override fun createStackElementTag(element: StackTraceElement): String? {
return "${element.fileName} : ${element.lineNumber} - ${element.methodName}"
}
}
1 change: 1 addition & 0 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies {
ThirdPartyDependencies.run {
implementation(interceptor)
implementation(gson)
implementation(timber)
implementation(retrofit2)
implementation(retrofit2Converter)
}
Expand Down

0 comments on commit c6a7409

Please sign in to comment.