InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
8.76k stars 695 forks source link

SLF4JLogger is using the wrong level when printing to logger #1870

Open swermin opened 1 month ago

swermin commented 1 month ago

From my experimentations I found that the SLF4JLogger always prints in what ever level the class has been configured for instead of the incoming level from the function, see this link

From my test code, I added the logger like this

install(KoinIsolated) {
    slf4jLogger()
    createEagerInstances()
}

With that it always printed info, even if the log level was supposed to be warn.