From b02f433a3f41eae847b62bd50a62be94c9fff3f9 Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Tue, 21 May 2024 16:58:38 -0400 Subject: [PATCH] Remove log functions from TreehousePlatform We have event listeners now. --- .../treehouse/AndroidTreehousePlatform.kt | 9 --------- .../cash/redwood/treehouse/TreehousePlatform.kt | 4 ---- .../redwood/treehouse/IosTreehousePlatform.kt | 17 ----------------- 3 files changed, 30 deletions(-) diff --git a/redwood-treehouse-host/src/androidMain/kotlin/app/cash/redwood/treehouse/AndroidTreehousePlatform.kt b/redwood-treehouse-host/src/androidMain/kotlin/app/cash/redwood/treehouse/AndroidTreehousePlatform.kt index a4c69a7883..f72e0adc5d 100644 --- a/redwood-treehouse-host/src/androidMain/kotlin/app/cash/redwood/treehouse/AndroidTreehousePlatform.kt +++ b/redwood-treehouse-host/src/androidMain/kotlin/app/cash/redwood/treehouse/AndroidTreehousePlatform.kt @@ -17,7 +17,6 @@ package app.cash.redwood.treehouse import android.content.Context import android.content.Context.MODE_PRIVATE -import android.util.Log import app.cash.zipline.loader.ZiplineCache import okio.FileSystem import okio.Path.Companion.toOkioPath @@ -25,14 +24,6 @@ import okio.Path.Companion.toOkioPath internal class AndroidTreehousePlatform( private val context: Context, ) : TreehousePlatform { - override fun logInfo(message: String, throwable: Throwable?) { - Log.i("Zipline", message, throwable) - } - - override fun logWarning(message: String, throwable: Throwable?) { - Log.w("Zipline", message, throwable) - } - /** * Note that we don't put the ZiplineCache in Android's cacheDir. * diff --git a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehousePlatform.kt b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehousePlatform.kt index 640619f0bf..3cc3a428bb 100644 --- a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehousePlatform.kt +++ b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehousePlatform.kt @@ -18,9 +18,5 @@ package app.cash.redwood.treehouse import app.cash.zipline.loader.ZiplineCache internal interface TreehousePlatform { - fun logInfo(message: String, throwable: Throwable?) - - fun logWarning(message: String, throwable: Throwable?) - fun newCache(name: String, maxSizeInBytes: Long): ZiplineCache } diff --git a/redwood-treehouse-host/src/iosMain/kotlin/app/cash/redwood/treehouse/IosTreehousePlatform.kt b/redwood-treehouse-host/src/iosMain/kotlin/app/cash/redwood/treehouse/IosTreehousePlatform.kt index abb766994a..84a495bb71 100644 --- a/redwood-treehouse-host/src/iosMain/kotlin/app/cash/redwood/treehouse/IosTreehousePlatform.kt +++ b/redwood-treehouse-host/src/iosMain/kotlin/app/cash/redwood/treehouse/IosTreehousePlatform.kt @@ -19,25 +19,8 @@ import app.cash.zipline.loader.ZiplineCache import okio.FileSystem import okio.Path.Companion.toPath import platform.Foundation.NSHomeDirectory -import platform.Foundation.NSLog internal class IosTreehousePlatform : TreehousePlatform { - override fun logInfo(message: String, throwable: Throwable?) { - if (throwable != null) { - NSLog("Treehouse: $message ${throwable.stackTraceToString()}") - } else { - NSLog("Treehouse: $message") - } - } - - override fun logWarning(message: String, throwable: Throwable?) { - if (throwable != null) { - NSLog("Treehouse: $message ${throwable.stackTraceToString()}") - } else { - NSLog("Treehouse: $message") - } - } - override fun newCache(name: String, maxSizeInBytes: Long) = ZiplineCache( fileSystem = FileSystem.SYSTEM, directory = NSHomeDirectory().toPath() / name,