From 3baf1eda9abdc4fcf8d5e396a14c7f1921d4d66c Mon Sep 17 00:00:00 2001 From: Tueem Date: Fri, 20 Dec 2024 00:44:48 +0100 Subject: [PATCH] log the result of an InteractionCheck --- .../java/net/tomatentum/marinara/checks/AppliedCheck.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/checks/AppliedCheck.java b/lib/src/main/java/net/tomatentum/marinara/checks/AppliedCheck.java index 3cd0b83..6b4c487 100644 --- a/lib/src/main/java/net/tomatentum/marinara/checks/AppliedCheck.java +++ b/lib/src/main/java/net/tomatentum/marinara/checks/AppliedCheck.java @@ -23,7 +23,9 @@ public record AppliedCheck(InteractionCheck check, Annotation annotation) { method.setAccessible(true); try { logger.debug("Executing pre check {} with context {}", check.getClass().getName(), context.toString()); - return (boolean) method.invoke(check, context, annotation); + boolean result = (boolean) method.invoke(check, context, annotation); + logger.debug("Pre Check {} {} with context {}", check.getClass().getName(), result ? "succeeded" : "failed", context.toString()); + return result; } catch (IllegalAccessException | InvocationTargetException | SecurityException e) { logger.fatal(e); return false;