Avoid SL4J noise by triggering logger init from single thread #28673

This commit is contained in:
Johan Andrén 2020-03-03 16:18:33 +01:00 committed by GitHub
parent 0eb3cd548b
commit e6ee6ee4e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@ import akka.annotation.InternalApi
import akka.util.Timeout
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import org.slf4j.LoggerFactory
object ActorTestKit {
@ -132,6 +133,9 @@ object ActorTestKit {
*/
final class ActorTestKit private[akka] (val name: String, val config: Config, settings: Option[TestKitSettings]) {
// avoid slf4j noise by touching it first from single thread #28673
LoggerFactory.getLogger(name).debug("Starting ActorTestKit")
implicit def testKitSettings: TestKitSettings =
settings.getOrElse(TestKitSettings(system))