https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
l

Larten

08/27/2020, 12:35 PM
Hi! We released our solution to multiplatform logging. Feel free to check it! (We are using in production 😎) https://github.com/FitPuli/abele
l

Larten

08/27/2020, 12:42 PM
How do you mean “Where is?“?
a

aleksey.tomin

08/27/2020, 12:46 PM
Where is non-abstract logger for native?
a

agta1991

08/27/2020, 12:48 PM
The library itself does not provide default Tree implementations, NativeLogTree is only an abstract helper, for implementing debug tree, where we only log to the platforms native log output as a single string (for example to send it to NSLog on iOS)
The mentioned example would look like this in the simplest case for iOS:
Copy code
import hu.fitpuli.abele.Abele
import hu.fitpuli.abele.NativeLogTree
import platform.Foundation.NSLog

class DebugTree: NativeLogTree(Abele.DEBUG) {
    override fun writeLog(s: String): Unit = NSLog(s)
}
a

aleksey.tomin

08/27/2020, 1:36 PM
I think solution is a library like https://github.com/MicroUtils/kotlin-logging or https://github.com/touchlab/Kermit In this libraries I can write
Copy code
logger = KotlinLogging.logger {}
and work with logging
l

Larten

08/27/2020, 1:47 PM
We are using our solution a few months ago and during this we not really checked other solutions. But yeah, it looks like good. We dropped a lot of 3rd party libs from the mpp project, because they don’t maintain or just rarely. Just choose the best for your requirements! 😉
a

aleksey.tomin

08/27/2020, 3:53 PM
Thank you! I have not chosen yet. And I will try to use your - maybe it’s the best option :)
l

Larten

08/27/2020, 4:08 PM
I guess we will provide default tree implementations in the future, but currently we are using only for Android and iOS