Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into DHIS2-18631
Browse files Browse the repository at this point in the history
  • Loading branch information
enricocolasante committed Dec 18, 2024
2 parents 593491c + efccebc commit 929f60c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ kotlin {
implementation(kotlin("test"))
}
}
val jvmMain by getting
val jvmMain by getting {
dependencies {
api("org.slf4j:slf4j-api:1.7.36")
}
}
val jvmTest by getting
val jsMain by getting {
dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@ internal class RuleConditionEvaluator {
}

companion object {
private val log = createLogger(RuleConditionEvaluator::class.simpleName!!)
private val log = createLogger("org.hisp.dhis.rules.engine.RuleConditionEvaluator")
}
}
6 changes: 4 additions & 2 deletions src/jvmMain/kotlin/org/hisp/dhis/rules/Logger.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.hisp.dhis.rules

import org.slf4j.LoggerFactory

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 = LoggerFactory.getLogger(className)
return Logger({message -> javaLogger.error(message)}, {message: String -> javaLogger.debug(message)})
}

0 comments on commit 929f60c

Please sign in to comment.