GH-628 Clean up logging levels

Resolves #628
This commit is contained in:
Oleg Zhurakousky
2021-01-11 09:50:21 +01:00
parent 67adf563fc
commit 855c70538a
2 changed files with 17 additions and 11 deletions

View File

@@ -114,8 +114,8 @@ public class BeanFactoryAwareFunctionRegistry extends SimpleFunctionRegistry imp
Set<String> functionRegistratioinNames = super.getNames(null);
String[] functionNames = StringUtils.delimitedListToStringArray(functionDefinition.replaceAll(",", "|").trim(), "|");
for (String functionName : functionNames) {
if (functionRegistratioinNames.contains(functionName)) {
logger.info("Skipping function '" + functionName + "' since it is already present");
if (functionRegistratioinNames.contains(functionName) && logger.isDebugEnabled()) {
logger.debug("Skipping function '" + functionName + "' since it is already present");
}
else {
Object functionCandidate = this.discoverFunctionInBeanFactory(functionName);

View File

@@ -229,7 +229,10 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
wrappedFunction = new FunctionInvocationWrapper(function) {
@Override
Object doApply(Object input) {
logger.info("Executing around advise(s)");
if (logger.isDebugEnabled()) {
logger.debug("Executing around advise(s): " + functionAroundWrapper);
}
return functionAroundWrapper.apply(input, function);
}
};
@@ -1063,14 +1066,17 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
if (FunctionTypeUtils.isMessage(type)) {
if (convertedInput == null) {
/*
* In the event conversion was unsuccessful we simply return the original un-converted message.
* This will help to deal with issues like KafkaNull and others. However if this was not the intention
* of the developer, this would be discovered early in the development process where the
* additional message converter could be added to facilitate the conversion.
*/
logger.info("Input type conversion of payload " + message.getPayload() + " resulted in 'null'. "
+ "Will use the original message as input.");
if (logger.isDebugEnabled()) {
/*
* In the event conversion was unsuccessful we simply return the original un-converted message.
* This will help to deal with issues like KafkaNull and others. However if this was not the intention
* of the developer, this would be discovered early in the development process where the
* additional message converter could be added to facilitate the conversion.
*/
logger.debug("Input type conversion of payload " + message.getPayload() + " resulted in 'null'. "
+ "Will use the original message as input.");
}
convertedInput = message;
}
else {