Merge pull request #7386 from Duhemm/log4j-loggers-list

Keep logger names in hash set
This commit is contained in:
eugene yokota 2023-10-12 02:55:39 -04:00 committed by GitHub
commit 1f94406ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -428,6 +428,7 @@ lazy val utilLogging = (project in file("internal") / "util-logging")
exclude[MissingTypesProblem]("sbt.internal.util.ConsoleAppender"),
exclude[MissingTypesProblem]("sbt.internal.util.BufferedAppender"),
exclude[MissingClassProblem]("sbt.internal.util.Terminal$BlockingInputStream$"),
exclude[IncompatibleResultTypeProblem]("sbt.util.LoggerContext#Log4JLoggerContext.loggers"),
),
)
.configure(addSbtIO)

View File

@ -46,7 +46,7 @@ object LoggerContext {
case a: AbstractConfiguration => a
case _ => throw new IllegalStateException("")
}
val loggers = new java.util.Vector[String]
val loggers = new java.util.HashSet[String]
private[this] val closed = new AtomicBoolean(false)
override def logger(
name: String,