diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/VersionCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/VersionCommand.java index e5b4434c..2c5d142a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/VersionCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/VersionCommand.java @@ -1,11 +1,17 @@ package pro.gravit.launchserver.command.basic; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.utils.Version; +import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; +import java.lang.management.RuntimeMXBean; + public final class VersionCommand extends Command { + private transient final Logger logger = LogManager.getLogger(); public VersionCommand(LaunchServer server) { super(server); } @@ -22,6 +28,9 @@ public String getUsageDescription() { @Override public void invoke(String... args) { - LogHelper.subInfo("LaunchServer version: %d.%d.%d (build #%d)", Version.MAJOR, Version.MINOR, Version.PATCH, Version.BUILD); + logger.info("LaunchServer version: {}.{}.{} (build #{})", Version.MAJOR, Version.MINOR, Version.PATCH, Version.BUILD); + RuntimeMXBean mxBean = JVMHelper.RUNTIME_MXBEAN; + logger.info("Java {}({})", JVMHelper.getVersion(), mxBean.getVmVersion()); + logger.info("Java Home: {}", System.getProperty("java.home", "UNKNOWN")); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java index 4b557a1d..bcc9d80e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java @@ -14,7 +14,7 @@ import java.util.Arrays; public class ModulesCommand extends Command { - private transient Logger logger = LogManager.getLogger(); + private transient final Logger logger = LogManager.getLogger(); public ModulesCommand(LaunchServer server) { super(server); }