From ff46c3be513942f47d37001f13f56597d7956d22 Mon Sep 17 00:00:00 2001 From: Binara-Sachin Date: Thu, 24 Oct 2024 06:49:50 +0530 Subject: [PATCH] Improve debug logs --- .../sts/passive/custom/provider/CustomCryptoProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/custom/provider/CustomCryptoProvider.java b/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/custom/provider/CustomCryptoProvider.java index ef63530b..5c935e5b 100644 --- a/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/custom/provider/CustomCryptoProvider.java +++ b/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/custom/provider/CustomCryptoProvider.java @@ -75,12 +75,12 @@ protected KeyStore load(InputStream input, String storepass, String provider, St log.debug("Loading keystore..."); try { String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); - return IdentityKeyStoreResolver.getInstance().getKeyStore( + KeyStore keyStore = IdentityKeyStoreResolver.getInstance().getKeyStore( tenantDomain, IdentityKeyStoreResolverConstants.InboundProtocol.WS_FEDERATION); + log.debug("Successfully retrieved the keystore."); + return keyStore; } catch (IdentityKeyStoreResolverException e) { - if (log.isDebugEnabled()) { - log.debug("Error occurred when loading keystore.", e); - } + log.debug("Error occurred when loading keystore.", e); throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e); } }