touchlab / Kermit

Kermit by Touchlab is a Kotlin Multiplatform centralized logging utility.
https://kermit.touchlab.co
Apache License 2.0
718 stars 41 forks source link

Tag function broken in 2.0.1 #371

Closed sproctor closed 1 year ago

sproctor commented 1 year ago

I didn't test on 2.0.0, but it was working on 1.2.2.

This fails on 2.0.1:

Logger.d("MyTag") { "message" }

Message:

e: None of the following functions can be called with the arguments supplied: 
public final inline fun d(messageString: String, throwable: Throwable? = ..., tag: String = ...): Unit defined in co.touchlab.kermit.Logger.Companion
public final inline fun d(throwable: Throwable? = ..., tag: String = ..., message: () -> String): Unit defined in co.touchlab.kermit.Logger.Companion

This works on 2.0.1:

Logger.d(tag = "MyTag") { "message" }
kpgalligan commented 1 year ago

Sorry, the api refactor missed the global functions there. Posted a PR and will chat about the api a bit tomorrow with the team, then release.

https://github.com/touchlab/Kermit/pull/372

findjigar commented 1 year ago

Fixed. Will be released in next version today/tomorrow.