Dieter
Dieter

Reputation: 311

How to wrap an existing slf4j logger into a kotlin logger?

Given an existing slf4j logger, I would like to wrap it into an kotlin-logging logger.

The classes / methods to do that already exists in the library but are internal, so I can't call them: mu.internal.KLoggerFactory.wrapJLogger()

Is there another way to do it, which is accessible to users of the library?

Upvotes: 1

Views: 504

Answers (1)

oshai
oshai

Reputation: 15355

It's possible to use the extension method: Logger.toKLogger() since 1.7.6. see this issue for more details: https://github.com/MicroUtils/kotlin-logging/issues/88

Upvotes: 2

Related Questions