-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#178 [feat] App -> HousApp 네이밍 변경 및 Timber 적용
- Loading branch information
Showing
5 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
12
app/src/main/java/com/hous/hous_aos/util/TimberDebugTree.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters