diff --git a/build.gradle.kts b/build.gradle.kts index 63d1aeef..ee41b178 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -58,7 +58,11 @@ kotlin { implementation(kotlin("test")) } } - val jvmMain by getting + val jvmMain by getting { + dependencies { + implementation("org.slf4j:slf4j-api:1.7.36") + } + } val jvmTest by getting val jsMain by getting val jsTest by getting diff --git a/src/jvmMain/kotlin/org/hisp/dhis/rules/Logger.kt b/src/jvmMain/kotlin/org/hisp/dhis/rules/Logger.kt index d1ca11cc..98aead91 100644 --- a/src/jvmMain/kotlin/org/hisp/dhis/rules/Logger.kt +++ b/src/jvmMain/kotlin/org/hisp/dhis/rules/Logger.kt @@ -1,6 +1,6 @@ package org.hisp.dhis.rules actual fun createLogger(className: String): Logger{ - val javaLogger = java.util.logging.Logger.getLogger(className) - return Logger({message -> javaLogger.severe(message)}, {message: String -> javaLogger.fine(message)}) + val javaLogger = org.slf4j.LoggerFactory.getLogger(className) + return Logger({message -> javaLogger.error(message)}, {message: String -> javaLogger.debug(message)}) } \ No newline at end of file