CORDA-2524 - Minor – reduce notary service logging noise (#4672)

This commit is contained in:
Andrius Dagys 2019-01-29 16:41:14 +01:00 committed by Katelyn Baker
parent 9efe636829
commit 9abf44ea81

View File

@ -13,14 +13,17 @@ class SimpleNotaryService(override val services: ServiceHubInternal, override va
private val notaryConfig = services.configuration.notary private val notaryConfig = services.configuration.notary
?: throw IllegalArgumentException("Failed to register ${this::class.java}: notary configuration not present") ?: throw IllegalArgumentException("Failed to register ${this::class.java}: notary configuration not present")
init {
val mode = if (notaryConfig.validating) "validating" else "non-validating"
log.info("Starting notary in $mode mode")
}
override val uniquenessProvider = PersistentUniquenessProvider(services.clock, services.database, services.cacheFactory) override val uniquenessProvider = PersistentUniquenessProvider(services.clock, services.database, services.cacheFactory)
override fun createServiceFlow(otherPartySession: FlowSession): NotaryServiceFlow { override fun createServiceFlow(otherPartySession: FlowSession): NotaryServiceFlow {
return if (notaryConfig.validating) { return if (notaryConfig.validating) {
log.info("Starting in validating mode")
ValidatingNotaryFlow(otherPartySession, this, notaryConfig.etaMessageThresholdSeconds.seconds) ValidatingNotaryFlow(otherPartySession, this, notaryConfig.etaMessageThresholdSeconds.seconds)
} else { } else {
log.info("Starting in non-validating mode")
NonValidatingNotaryFlow(otherPartySession, this, notaryConfig.etaMessageThresholdSeconds.seconds) NonValidatingNotaryFlow(otherPartySession, this, notaryConfig.etaMessageThresholdSeconds.seconds)
} }
} }