From 9abf44ea812863b60d3cbae2bb4190ebc6a30f41 Mon Sep 17 00:00:00 2001 From: Andrius Dagys Date: Tue, 29 Jan 2019 16:41:14 +0100 Subject: [PATCH] =?UTF-8?q?CORDA-2524=20-=20Minor=20=E2=80=93=20reduce=20n?= =?UTF-8?q?otary=20service=20logging=20noise=20(#4672)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../node/services/transactions/SimpleNotaryService.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt b/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt index 3bbf32ef66..b5df7f3a7f 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt @@ -13,14 +13,17 @@ class SimpleNotaryService(override val services: ServiceHubInternal, override va private val notaryConfig = services.configuration.notary ?: 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 fun createServiceFlow(otherPartySession: FlowSession): NotaryServiceFlow { return if (notaryConfig.validating) { - log.info("Starting in validating mode") ValidatingNotaryFlow(otherPartySession, this, notaryConfig.etaMessageThresholdSeconds.seconds) } else { - log.info("Starting in non-validating mode") NonValidatingNotaryFlow(otherPartySession, this, notaryConfig.etaMessageThresholdSeconds.seconds) } }