mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
CORDA-2524 - Minor – reduce notary service logging noise (#4672)
This commit is contained in:
parent
9efe636829
commit
9abf44ea81
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user