Skip to content

Commit 8294dac

Browse files
authored
Merge pull request #99 from it-at-m/fix-captcha-metrics
Add debug logging
2 parents 4d4e8a0 + f885e67 commit 8294dac

File tree

1 file changed

+3
-0
lines changed
  • captchaservice-backend/src/main/java/de/muenchen/captchaservice/service/captcha

1 file changed

+3
-0
lines changed

captchaservice-backend/src/main/java/de/muenchen/captchaservice/service/captcha/CaptchaService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ public boolean verify(final String siteKey, final ExtendedPayload payload, final
5858
}
5959
try {
6060
final boolean isValid = Altcha.verifySolution(payload, captchaProperties.hmacKey(), true);
61+
log.info("Altcha.verifySolution() returned {} for payloadHash={}", isValid, getPayloadHash(payload));
6162
if (isValid) {
63+
log.info("Sucessfully verified. Recording success for metrics...");
6264
metricsService.recordVerifySuccess(siteKey, sourceAddress);
6365

6466
if (payload.getTook() != null) {
67+
log.info("Recording client solve time metric: took={} ms", payload.getTook());
6568
metricsService.recordClientSolveTime(siteKey, sourceAddress, payload.getTook());
6669
}
6770

0 commit comments

Comments
 (0)