apache / logging-log4j-kotlin

A Kotlin-friendly interface to log against the Log4j API
https://logging.apache.org/log4j/kotlin
Apache License 2.0
45 stars 11 forks source link

Support Kotlin multi-platform #59

Open rocketraman opened 6 months ago

rocketraman commented 6 months ago

It would be nice if the API supported Kotlin multi-platform, and so could be used on other platforms that Kotlin targets, such as native, JavaScript, and WASM.

Log4j2 is obviously a JVM-only solution but this library is mostly just an API. We could make it easier for users to plugin in different backends for different platforms, and provide some reasonable choices out of the box for each platform.

jvz commented 6 months ago

Yes, I like this idea. Once that is in place, we can even implement some minimal multi-platform implementations (e.g., there's a common println and readln function for all platforms), and we may even be able to support some OS-native logging APIs (like syslog, systemd, Windows event logger, and whatever the macOS API is).