From 0bc5302f7b83e53378d88459cf21ee56db4e3719 Mon Sep 17 00:00:00 2001 From: Janis Saldabols Date: Wed, 3 Jul 2024 09:36:58 +0300 Subject: [PATCH] PR-1814 Add extra logging for debug --- .../folio/ncip/services/FolioLookupUserService.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/folio/ncip/services/FolioLookupUserService.java b/src/main/java/org/folio/ncip/services/FolioLookupUserService.java index 2e5017e..6066ea9 100644 --- a/src/main/java/org/folio/ncip/services/FolioLookupUserService.java +++ b/src/main/java/org/folio/ncip/services/FolioLookupUserService.java @@ -1,7 +1,7 @@ package org.folio.ncip.services; - -import org.apache.log4j.Logger; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.extensiblecatalog.ncip.v2.service.AgencyId; import org.extensiblecatalog.ncip.v2.service.AgencyUserPrivilegeType; import org.extensiblecatalog.ncip.v2.service.AuthenticationInput; @@ -42,7 +42,7 @@ public class FolioLookupUserService extends FolioNcipService implements LookupUserService { - private static final Logger logger = Logger.getLogger(FolioLookupUserService.class); + private static final Logger logger = LogManager.getLogger(FolioLookupUserService.class); public long reqTimeoutMs; public JsonObject obj; private Properties ncipProperties; @@ -385,10 +385,14 @@ private String getOkMessage(String agencyId) { private void checkPinIfNeeded(LookupUserInitiationData initData, FolioRemoteServiceManager serviceManager, String userId) throws FolioNcipException { + logger.info("Start PIN check"); if (initData.getAuthenticationInputs() != null) { + logger.info("Have auth inputs"); for (AuthenticationInput authenticationInput : initData.getAuthenticationInputs()) { String authType = authenticationInput.getAuthenticationInputType().getValue(); + logger.info("Input type {}", authType); if (Constants.AUTH_TYPE_PIN.equalsIgnoreCase(authType)) { + logger.info("PIN check needed"); String authValue = authenticationInput.getAuthenticationInputData(); serviceManager.checkUserPin(userId, authValue); }