CORDA-3060: Notary logging improvements

Add more detailed logging to the notary service flow.
This commit is contained in:
Andrius Dagys
2019-09-12 14:20:46 +01:00
parent 16e4650d8d
commit c7cd947c32
3 changed files with 9 additions and 7 deletions

View File

@ -61,7 +61,7 @@ class NotaryFlow {
logger.info("Sending transaction to notary: ${notaryParty.name}.")
progressTracker.currentStep = REQUESTING
val response = notarise(notaryParty)
logger.info("Notary responded.")
logger.info("Notary responded (${notaryParty.name}).")
progressTracker.currentStep = VALIDATING
return validateResponse(response, notaryParty)
}

View File

@ -81,6 +81,7 @@ abstract class NotaryServiceFlow(val otherSideSession: FlowSession, val service:
try {
val transaction = extractParts(requestPayload)
transactionId = transaction.id
logger.info("Received a notarisation request for Tx [$transactionId] from [${otherSideSession.counterparty.name}]")
checkNotary(transaction.notary)
checkParameterHash(transaction.networkParametersHash)
checkInputs(transaction.inputs + transaction.references)
@ -125,6 +126,7 @@ abstract class NotaryServiceFlow(val otherSideSession: FlowSession, val service:
@Suspendable
private fun signTransactionAndSendResponse(txId: SecureHash) {
val signature = service.signTransaction(txId)
logger.info("Transaction [$txId] successfully notarised, sending signature back to [${otherSideSession.counterparty.name}]")
otherSideSession.send(NotarisationResponse(listOf(signature)))
}