feat(core): Categorize hooks output. Relates to
@@ -81,6 +81,10 @@ public final class CommandHookExecutor {
context.getLogger().info(RB.$("hooks.execution"), event.getType().name().toLowerCase(Locale.ENGLISH), hooks.size());
}
+ context.getLogger().setPrefix("hooks");
+ context.getLogger().increaseIndent();
+
+ try {
for (CommandHook hook : hooks) {
String resolvedCmd = hook.getResolvedCmd(context, event);
@@ -108,6 +112,10 @@ public final class CommandHookExecutor {
}
}
}
+ } finally {
+ context.getLogger().decreaseIndent();
+ context.getLogger().restorePrefix();
+ }
}
private Collection<? extends CommandHook> filter(List<CommandHook> hooks, ExecutionEvent event) {
