I’m trying to upgrade a JVM based project from v3....
# kotlin-logging
j
I’m trying to upgrade a JVM based project from v3.x to v5.x. We have some places where we pass in a
KLogger
into some methods requiring a SLF4J
Logger
. In 5.x,
Klogger
no longer extends
org.slf4j.Logger
And so we can’t directly pass it in. In this comment for Issue 264, it was said:
The idea is that slf4j will still be supported, but instead of inheritance it will be via wrapping it.
I’m not seeing how to wrap a
KLogger
in order to make it useable as a SLF4J
Logger
. Any guidance?
o
Like this:
Copy code
(logger as DelegatingKLogger<org.slf4j.Logger>).underlyingLogger
j
Thanks.