Skip to content

Commit

Permalink
fix logback not configuring in standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
testersen committed Jan 26, 2024
1 parent caf9296 commit 095ce48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions autoconf-logback-configuration-standalone/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dependencies {
implementation(project(":autoconf-logback-configure"))
implementation("ch.qos.logback:logback-classic:1.4.14")
implementation("ch.qos.logback:logback-core:1.4.14")
api("org.slf4j:slf4j-api:2.0.9")
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import ch.qos.logback.classic.LoggerContext
import ch.qos.logback.classic.spi.Configurator
import ch.qos.logback.core.spi.ContextAwareBase
import no.telenor.kt.autoconf.logback.configure.Configure
import org.slf4j.LoggerFactory

internal class Initializer : ContextAwareBase(), Configurator {
override fun configure(ctx: LoggerContext): Configurator.ExecutionStatus {
val context = LoggerFactory.getILoggerFactory() as LoggerContext
Configure.configure(context)
Configure.configure(ctx)
return Configurator.ExecutionStatus.DO_NOT_INVOKE_NEXT_IF_ANY
}
}

0 comments on commit 095ce48

Please sign in to comment.