Skip to content

Commit 379aa5b

Browse files
committed
Revert "Demonstrate how to use a delegate class"
This reverts commit c4cdab1.
1 parent 4894135 commit 379aa5b

3 files changed

Lines changed: 6 additions & 81 deletions

File tree

sample/src/main/java/info/hannes/logcat/CrashlyticApplication.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import info.hannes.timber.FileLoggingTree
1010
import timber.log.Timber
1111

1212

13-
class CrashlyticApplication : LoggingApplication(delegator = CustomLogger::class.java) {
14-
15-
private val logger = CustomLogger()
13+
class CrashlyticApplication : LoggingApplication() {
1614

1715
@SuppressLint("HardwareIds")
1816
override fun onCreate() {
@@ -25,15 +23,15 @@ class CrashlyticApplication : LoggingApplication(delegator = CustomLogger::class
2523
FirebaseCrashlytics.getInstance().setCustomKey("VERSION_NAME", BuildConfig.VERSIONNAME)
2624
Timber.plant(CrashlyticsTree(Settings.Secure.getString(applicationContext.contentResolver, Settings.Secure.ANDROID_ID)))
2725

28-
logger.d("Debug test")
29-
logger.i("Info test")
30-
logger.w("Warning test")
31-
logger.e("Error test")
26+
Timber.d("Debug test")
27+
Timber.i("Info test")
28+
Timber.w("Warning test")
29+
Timber.e("Error test")
3230

3331
var x = 0
3432
val runner: Runnable = object : Runnable {
3533
override fun run() {
36-
logger.d("live=$x")
34+
Timber.d("live=$x")
3735
x++
3836
Handler(Looper.getMainLooper()).postDelayed(this, 3000)
3937
}

sample/src/main/java/info/hannes/logcat/CustomLogger.kt

Lines changed: 0 additions & 51 deletions
This file was deleted.

sample/src/main/java/info/hannes/logcat/Logger.kt

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)