diff --git a/java/dev/enola/cli/EnolaCLI.java b/java/dev/enola/cli/EnolaCLI.java index e87b4f41a..e56bad480 100644 --- a/java/dev/enola/cli/EnolaCLI.java +++ b/java/dev/enola/cli/EnolaCLI.java @@ -53,10 +53,7 @@ public class EnolaCLI { boolean[] verbosity = {}; static CLI cli(String... args) { - // TODO This runs "too early" (before parameter parsing and logging initialization of it)... - // see https://stackoverflow.com/q/78679524/421602 - Lifecycle.start(); - + // Add any "initialization" to class Lifecycle#start(), instead of here! var enola = new EnolaCLI(); return new CLI( args, diff --git a/java/dev/enola/cli/Lifecycle.java b/java/dev/enola/cli/Lifecycle.java index 99030178b..cde25d206 100644 --- a/java/dev/enola/cli/Lifecycle.java +++ b/java/dev/enola/cli/Lifecycle.java @@ -28,8 +28,8 @@ final class Lifecycle { static void start() { LOG.info( - "Hi! \uD83D\uDC4B I'm https://Enola.dev v{}. " - + "\uD83D\uDC7D \uD83D\uDC7E Resistance is futile. We are ONE. " + "Hi! \uD83D\uDC4B I'm https://Enola.dev {}. " + + "\uD83D\uDC7D Resistance \uD83D\uDC7E is futile. We are ONE. " + "What's your goal, today?\n", Version.get()); } diff --git a/java/dev/enola/cli/LoggingMixin.java b/java/dev/enola/cli/LoggingMixin.java index 12314b7c7..39367894d 100644 --- a/java/dev/enola/cli/LoggingMixin.java +++ b/java/dev/enola/cli/LoggingMixin.java @@ -62,6 +62,8 @@ public static int executionStrategy(CommandLine.ParseResult parseResult) { configureJUL(level); + Lifecycle.start(); + // And now back to and onwards with the default execution strategy return new CommandLine.RunLast().execute(parseResult); }