refactor: simplify PlatformLog actuals and convert remaining interpolated log calls to lambdas

- Extract private log() helper in JVM and iOS PlatformLog to reduce
  copy-paste branching
- Fix JVM formatter to be private and non-nullable
- Convert 60+ interpolated Log.w/e/i calls to lambda overloads,
  including hot-path Filter.kt toJson() and LocalCache event processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
davotoula
2026-03-28 16:38:07 +01:00
parent 3b81731771
commit 6d89de9444
42 changed files with 107 additions and 130 deletions
@@ -62,7 +62,7 @@ class LargeDBTests {
try {
db.insert(event)
} catch (e: SQLiteException) {
Log.w("LargeDBTests", "Error inserting event: ${e.message} for event: ${event.toJson()}")
Log.w("LargeDBTests") { "Error inserting event: ${e.message} for event: ${event.toJson()}" }
}
}
}
@@ -73,7 +73,7 @@ class LargeDBTests {
try {
db.insert(event)
} catch (e: SQLiteException) {
Log.w("LargeDBTests", "Error inserting event: ${e.message} for event: ${event.toJson()}")
Log.w("LargeDBTests") { "Error inserting event: ${e.message} for event: ${event.toJson()}" }
}
}
}