Skip to content

Commit

Permalink
MOSIP-35176 Enabled info log (#1575)
Browse files Browse the repository at this point in the history
Signed-off-by: kameshsr <[email protected]>
  • Loading branch information
kameshsr authored Sep 30, 2024
1 parent 5bf79b8 commit 105eda8
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void setEmbeddedValueResolver(StringValueResolver resolver) {

@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
logger.debug("inside setApplicationContext");
logger.info("inside setApplicationContext");
mappings = new HashMap<>();
for (String beanName : applicationContext.getBeanDefinitionNames()) {
//Skip processing this intentVerificationConfig bean.
Expand All @@ -52,25 +52,25 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
if (!((ConfigurableApplicationContext) applicationContext).getBeanFactory().getBeanDefinition(beanName)
.isLazyInit()) {
Object obj = applicationContext.getBean(beanName);
logger.debug("bean-"+ beanName);
logger.info("bean-"+ beanName);
Class<?> objClazz = obj.getClass();
logger.debug("objClazz"+ objClazz);
logger.info("objClazz"+ objClazz);
if (AopUtils.isAopProxy(obj)) {

objClazz = AopUtils.getTargetClass(obj);
}

for (Method method : objClazz.getDeclaredMethods()) {
logger.debug("method name-"+method);
logger.info("method name-"+method);
if (method.isAnnotationPresent(PreAuthenticateContentAndVerifyIntent.class)) {
PreAuthenticateContentAndVerifyIntent preAuthenticateContent = method
.getAnnotation(PreAuthenticateContentAndVerifyIntent.class);

String topic = preAuthenticateContent.topic();
logger.debug("topic- "+topic);
logger.info("topic- "+topic);

String callback = preAuthenticateContent.callback();
logger.debug("callback- "+callback);
logger.info("callback- "+callback);
if (topic.startsWith("${") && topic.endsWith("}")) {
topic = resolver.resolveStringValue(topic);
}
Expand All @@ -79,13 +79,14 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
callback = resolver.resolveStringValue(callback);
}
mappings.put(callback, topic);
logger.debug("mapping"+ mappings);
logger.info("mapping"+ mappings);
}
}
IntentVerificationFilter intentVerificationFilter = applicationContext
.getBean(IntentVerificationFilter.class);
intentVerificationFilter.setMappings(mappings);
logger.info("mapping after setting value-"+mappings);
}
}
}
}
}

0 comments on commit 105eda8

Please sign in to comment.