Skip to content

Releases: theshid/Pretty-Log

0.2.0 — Kotlin Multiplatform

01 May 15:11
f86e8da

Choose a tag to compare

First Kotlin Multiplatform release. PrettyLog is now callable from KMP commonMain — Android, JVM, and iOS share the same Log.{d,i,w,e,wtf,network,timed} API.

Targets

  • prettylog-android (AAR) — same Logcat output as before
  • prettylog-jvm (JAR) — println / System.err for desktop + server
  • prettylog-iosx64 / prettylog-iosarm64 / prettylog-iossimulatorarm64 (klib) — NSLog-backed
  • prettylog — KMP root metadata; Gradle picks the right variant per consumer

Pulling 0.2.0

JitPack (Android + JVM):

// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        maven("https://jitpack.io")
    }
}
// build.gradle.kts
implementation("com.github.theshid:Pretty-Log:0.2.0")

JitPack runs on Linux, so iOS klibs aren't published through that channel. If you need iOS distribution, build from source via ./gradlew :prettylog:publishToMavenLocal on macOS and consume io.github.theshid:prettylog:0.2.0 from Maven Local.

Migrating from 0.1.0

Source-compatible for Android consumers — no call-site changes needed. Log.d(...), PrettyLog.init(...), LogBreadcrumbs.dumpToFile(applicationContext) all keep working.

What changed

See #1 for the full migration writeup. Highlights:

  • Source layout: src/mainsrc/commonMain with expect/actual seams in PlatformLog.kt, CallerInfo.kt, and Platform.kt.
  • LogBreadcrumbs.dumpToFile(Context) moved to androidMain as a top-level extension.
  • ConcurrentLinkedDequeArrayDeque in the breadcrumb buffer (KMP-portable; trade-off: high-concurrency logging may very rarely drop a single breadcrumb).
  • kotlin.system.measureTimeMilliskotlin.time.measureTimedValue in Log.timed.
  • @kotlin.jvm.Volatile@kotlin.concurrent.Volatile on PrettyLog.service.
  • iOS targets gated on macOS hosts so JitPack/Linux builds publish Android + JVM only (#2).

Pretty Log 0.1.0

24 Apr 11:39

Choose a tag to compare

Initial PrettyLog library