diff options
author | Simon Rettberg | 2022-03-24 12:03:31 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-03-24 12:03:31 +0100 |
commit | 62521f9171887e4307dda34042743e4ddc5768ed (patch) | |
tree | 17de739206770d0252c8b7d4e869f2b66f7aa213 | |
parent | Print maximum VM memory in logHeader() (diff) | |
download | master-sync-shared-62521f9171887e4307dda34042743e4ddc5768ed.tar.gz master-sync-shared-62521f9171887e4307dda34042743e4ddc5768ed.tar.xz master-sync-shared-62521f9171887e4307dda34042743e4ddc5768ed.zip |
[AppUtil] logHeader: Print VM bitness
-rw-r--r-- | src/main/java/org/openslx/util/AppUtil.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/util/AppUtil.java b/src/main/java/org/openslx/util/AppUtil.java index 8733161..340dc21 100644 --- a/src/main/java/org/openslx/util/AppUtil.java +++ b/src/main/java/org/openslx/util/AppUtil.java @@ -31,6 +31,7 @@ public class AppUtil private static final String PROPERTY_APP_BUILD_JDK = "app.build.jdk"; private static final String PROPERTY_JAVA_OS_NAME = "os.name"; + private static final String PROPERTY_JAVA_OS_ARCH = "os.arch"; private static final String PROPERTY_JAVA_SPEC_VENDOR = "java.specification.vendor"; private static final String PROPERTY_JAVA_SPEC_NAME = "java.specification.name"; @@ -42,6 +43,8 @@ public class AppUtil private static final String PROPERTY_JAVA_MEMORY_LIMIT = "java.runtime.memory"; + private static final String PROPERTY_JAVA_BITNESS = "sun.arch.data.model"; + private static Attributes manifestAttributes = null; private static String getManifestValue( final String entry ) @@ -129,6 +132,7 @@ public class AppUtil public static void logHeader( final Logger logger, final String appName, final String appVersion ) { + // Format maximum VM memory final String mem; long limit = Runtime.getRuntime().maxMemory() / ( 1024l * 1024 ); if ( limit > 99999999 ) { @@ -154,6 +158,8 @@ public class AppUtil logJavaProperty( logger, AppUtil.PROPERTY_JAVA_VERSION ); logJavaProperty( logger, AppUtil.PROPERTY_JAVA_VERSION_VM ); logJavaProperty( logger, AppUtil.PROPERTY_JAVA_VERSION_RUNTIME ); + logJavaProperty( logger, AppUtil.PROPERTY_JAVA_BITNESS ); + logJavaProperty( logger, AppUtil.PROPERTY_JAVA_OS_ARCH ); logProperty( logger, AppUtil.PROPERTY_JAVA_MEMORY_LIMIT, mem ); logger.info( "-------------------------------------------------------------------------------" ); } |