Skip to content

Commit

Permalink
Removed unnecessary logging of protocol data
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-rowe committed Jul 12, 2015
1 parent 67757d2 commit 0edeaa7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public byte[] serialise() {
}
}

log.trace("Serialised matcherResponse = \n{}\n", builder.toString());
return builder.toString().getBytes(Charsets.UTF_8);

}
Expand Down Expand Up @@ -164,11 +163,4 @@ public int hashCode() {
return result;
}

@Override
public String toString() {
return "MatcherResponse{" +
"replayDateOptional=" + replayDateOptional +
", addressList=" + bitcoinAddresses +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,4 @@ public int hashCode() {
return result;
}

@Override
public String toString() {
return "PayerRequest{" +
"version=" + version +
", britWalletId=" + britWalletId +
", sessionKey=" + Arrays.toString(sessionKey) +
", firstTransactionDate=" + firstTransactionDate +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public String serialise() {
builder.append(PayerRequest.OPTIONAL_NOT_PRESENT_TEXT);
}

log.debug("Serialised walletToEncounterDateLink = \n" + builder.toString());
return builder.toString();

}
Expand All @@ -85,8 +84,6 @@ public String serialise() {
*/
public static WalletToEncounterDateLink parse(String serialisedWalletToEncounterDate) {

log.trace("Attempting to parse walletToEncounterDateLink:\n{}", serialisedWalletToEncounterDate);

if (serialisedWalletToEncounterDate == null) {
return null;
}
Expand Down Expand Up @@ -145,12 +142,4 @@ public int hashCode() {

}

@Override
public String toString() {
return "WalletToEncounterDateLink{" +
"britWalletId=" + britWalletId +
", encounterDateOptional=" + encounterDateOptional +
", firstTransactionDate=" + firstTransactionDate +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private EncryptedMatcherResponse newMatcherResponse(byte[] payload) throws NoSuc
try {
// The Matcher can decrypt the EncryptedPaymentRequest using its PGP secret key
final PayerRequest payerRequest = matcher.decryptPayerRequest(encryptedPayerRequest);
log.debug("Decrypted Version {} Payer request. BRIT walletId: {}", payerRequest.getVersion(), payerRequest.getBritWalletId());
log.debug("Decrypted Version {} Payer request.", payerRequest.getVersion());

// Get the Matcher to process the EncryptedPayerRequest
final MatcherResponse matcherResponse = matcher.process(payerRequest);
Expand All @@ -161,7 +161,7 @@ private EncryptedMatcherResponse newMatcherResponse(byte[] payload) throws NoSuc
// Encrypt the Matcher response with the AES session key
encryptedMatcherResponse = matcher.encryptMatcherResponse(matcherResponse, payerRequest);
Preconditions.checkNotNull(encryptedMatcherResponse, "'encryptedMatcherResponse' must be present");
log.debug("Encrypted Version {} matcher response, size: {} bytes", matcherResponse.getVersion(), encryptedMatcherResponse.getPayload().length);
log.debug("Encrypted Version {} Matcher response. Size: {} bytes", matcherResponse.getVersion(), encryptedMatcherResponse.getPayload().length);

// Put it in the cache for later
MatcherResponseCache.INSTANCE.put(sha1, encryptedMatcherResponse);
Expand Down

0 comments on commit 0edeaa7

Please sign in to comment.