touchlab / Kermit

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

Feature Request: Support for CLI applications #392

Open vegidio opened 7 months ago

vegidio commented 7 months ago

Does Kermit support CLI applications? I got it working in my iOS app, but when I tried to create a CLI application using KMP, it didn't print anything in my terminal. It only worked after I created a custom LogWriter, like this:

class YourCustomWriter : LogWriter() {
    override fun log(severity: Severity, message: String, tag: String, throwable: Throwable?) {
        println(message)
    }
}

Logger.setLogWriters(YourCustomWriter())
Logger.d { "Test" }