Hi, we're trying to add support for linux to kotli...
# kotlin-native
o
Hi, we're trying to add support for linux to kotlin-logging. @AnimusNull created a PR for that and since I don't work with Native I will be glad if someone can help with reviewing that: https://github.com/MicroUtils/kotlin-logging/pull/103
j
my review: wrapping a native c++ lib to do logging is probably better done per-project than per stdlib
can kotlin create "a thin wrapper around snprintf() function." without linking a lib?
o
It sounds like that, similar to the javascript implementation of the lib
n
Does kotlin-logging use C libraries, or does it use C++ ones?
j
what's the difference? kotlin has a string formatter, why would this benefit from being offloaded to a linked library?
n
Was helping out a Kotliner the other day (on a Gradle issue) who is working on the Linux support for kotlin-logging, and he mentioned that some native libraries are being used.
s
@napperley That was me working on the logging patch. I'm working on another appender using string formatting right now. I was thinking @jimn has the right approach with string formatting. Especially as we come into threads and concurrency. Much easier to bake in the thread/coroutine name we are in. I had started with the c lib due to it's tie ins with mobile platforms.
👍 2
o
@sean is you plan at the moment to have 2 flavours of the native kotlin-logging (one with simple printf and another one with dependencies)?
s
Right now I was going to strip out the c dependencies. It just complicates the build process. For little gain. It may be worth it for iOS, but I'm not to sure of that. I will note once I have the changes updated. At this time I'm just doing date/ log level in the message. With direction to STDOUT/STDERR. The formatter can be updated as needed
o
ok, thanks, let me know when it's ready (in the PR)
s
@jimn @oshai Updated with a new formatter string interface, deprecating the zfLog clib.