<@U0MEUGTCM> TLDR You need three artifacts. It's...
# multiplatform
l
@oshai TLDR You need three artifacts. It's possible to log even within common code. Full example of logging is in the link. Client code should call your common code. Your platform code should only support your common code. Your platform code is not for clients. You need jmv, js and common modules. Each application module (jvm, js, common) should depend on the same library module. Build all three jars to deliver your library. I think the best way to write code in common-style kotlin is to write all (most of) code in common module. And when you need some platform dependent api - use actual/extected for it. In you case platform dependent api is calling sl4j (jvm) and console.log (js). Move code to platform modules only this is really need. So client code (no matter - jvm, js or even common) should call your common code (that will use platform "actual" if it needed). You can find example of code and distripution (see build.gradle) here https://github.com/Lewik/klogging there is very simple logging library.
👍 1