diff --git a/agama/engine/src/main/java/io/jans/agama/engine/service/ActionService.java b/agama/engine/src/main/java/io/jans/agama/engine/service/ActionService.java index dbcba4926a2..7ac0c37583f 100644 --- a/agama/engine/src/main/java/io/jans/agama/engine/service/ActionService.java +++ b/agama/engine/src/main/java/io/jans/agama/engine/service/ActionService.java @@ -105,7 +105,9 @@ public Object callAction(Object instance, String className, String methodName, O throw new InstantiationException(msg); } - logger.debug("Constructor found: {}", constr.toGenericString()); + if (logger.isDebugEnabled()) { + logger.debug("Constructor found: {}", constr.toGenericString()); + } Object[] args = getArgsForCall(constr, arity, rhinoArgs); logger.debug("Creating an instance"); @@ -128,7 +130,9 @@ public Object callAction(Object instance, String className, String methodName, O throw new NoSuchMethodException(msg); } - logger.debug("Method found: {}", javaMethod.toGenericString()); + if (logger.isDebugEnabled()) { + logger.debug("Method found: {}", javaMethod.toGenericString()); + } Object[] args = getArgsForCall(javaMethod, arity, rhinoArgs); logger.debug("Performing method call");