You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I can't get it working at all. As soon as I try to run my program I get:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at io.github.oshai.kotlinlogging.slf4j.internal.Slf4jLoggerFactory.jLogger$kotlin_logging(Slf4jLoggerFactory.kt:11)
at io.github.oshai.kotlinlogging.internal.KLoggerFactory.logger$kotlin_logging(KLoggerFactory.kt:16)
at io.github.oshai.kotlinlogging.KotlinLogging.logger(KotlinLogging.kt:23)
at io.github.oshai.kotlinlogging.KotlinLogging.logger(KotlinLogging.kt:13)
at com.sleeyax.ManagerKt.<clinit>(Manager.kt:12)
at com.sleeyax.Manager.xxx(Manager.kt:17)
at com.sleeyax.MainKt.main(Main.kt:14)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 7 more
The text was updated successfully, but these errors were encountered:
It looks like I need to add a dependency to SLF4J and another logging library. I assumed kotlin-logging would be a simple standalone implementation but I guessed wrong. It's actually in the README but I skipped that section too fast.
I just installed the library and used it like in the README:
build.gradle.kts:
implementation("io.github.oshai:kotlin-logging-jvm:5.1.0")
manager.kt:
But I can't get it working at all. As soon as I try to run my program I get:
The text was updated successfully, but these errors were encountered: