在日志中记录 PROCESSOR_IDENTIFIER (#3619)
This commit is contained in:
@@ -225,8 +225,11 @@ public final class Launcher extends Application {
|
||||
LOG.info("Operating System: " + (OperatingSystem.OS_RELEASE_PRETTY_NAME == null
|
||||
? OperatingSystem.SYSTEM_NAME + ' ' + OperatingSystem.SYSTEM_VERSION
|
||||
: OperatingSystem.OS_RELEASE_PRETTY_NAME + " (" + OperatingSystem.SYSTEM_NAME + ' ' + OperatingSystem.SYSTEM_VERSION + ')'));
|
||||
LOG.info("System Architecture: " + Architecture.SYSTEM_ARCH_NAME);
|
||||
LOG.info("Java Architecture: " + Architecture.CURRENT_ARCH_NAME);
|
||||
if (OperatingSystem.CURRENT_OS == OperatingSystem.WINDOWS) {
|
||||
LOG.info("Processor Identifier: " + System.getenv("PROCESSOR_IDENTIFIER"));
|
||||
}
|
||||
LOG.info("System Architecture: " + Architecture.SYSTEM_ARCH.getDisplayName());
|
||||
LOG.info("Java Architecture: " + Architecture.CURRENT_ARCH.getDisplayName());
|
||||
LOG.info("Java Version: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor"));
|
||||
LOG.info("Java VM Version: " + System.getProperty("java.vm.name") + " (" + System.getProperty("java.vm.info") + "), " + System.getProperty("java.vm.vendor"));
|
||||
LOG.info("Java Home: " + System.getProperty("java.home"));
|
||||
@@ -245,7 +248,6 @@ public final class Launcher extends Application {
|
||||
LOG.info("XDG Session Type: " + System.getenv("XDG_SESSION_TYPE"));
|
||||
LOG.info("XDG Current Desktop: " + System.getenv("XDG_CURRENT_DESKTOP"));
|
||||
}
|
||||
|
||||
launch(Launcher.class, args);
|
||||
} catch (Throwable e) { // Fucking JavaFX will suppress the exception and will break our crash reporter.
|
||||
CRASH_REPORTER.uncaughtException(Thread.currentThread(), e);
|
||||
|
||||
@@ -43,8 +43,8 @@ public class CrashReport {
|
||||
stackTrace + "\n\n" +
|
||||
"-- System Details --\n" +
|
||||
" Operating System: " + OperatingSystem.SYSTEM_NAME + ' ' + OperatingSystem.SYSTEM_VERSION + "\n" +
|
||||
" System Architecture: " + Architecture.SYSTEM_ARCH_NAME + "\n" +
|
||||
" Java Architecture: " + Architecture.CURRENT_ARCH_NAME + "\n" +
|
||||
" System Architecture: " + Architecture.SYSTEM_ARCH.getDisplayName() + "\n" +
|
||||
" Java Architecture: " + Architecture.CURRENT_ARCH.getDisplayName() + "\n" +
|
||||
" Java Version: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor") + "\n" +
|
||||
" Java VM Version: " + System.getProperty("java.vm.name") + " (" + System.getProperty("java.vm.info") + "), " + System.getProperty("java.vm.vendor") + "\n" +
|
||||
" JVM Max Memory: " + Runtime.getRuntime().maxMemory() + "\n" +
|
||||
|
||||
@@ -85,8 +85,6 @@ public enum Architecture {
|
||||
return this == X86 || this == X86_64;
|
||||
}
|
||||
|
||||
public static final String CURRENT_ARCH_NAME;
|
||||
public static final String SYSTEM_ARCH_NAME;
|
||||
public static final Architecture CURRENT_ARCH;
|
||||
public static final Architecture SYSTEM_ARCH;
|
||||
|
||||
@@ -192,8 +190,7 @@ public enum Architecture {
|
||||
}
|
||||
|
||||
static {
|
||||
CURRENT_ARCH_NAME = System.getProperty("os.arch");
|
||||
CURRENT_ARCH = parseArchName(CURRENT_ARCH_NAME);
|
||||
CURRENT_ARCH = parseArchName(System.getProperty("os.arch"));
|
||||
|
||||
String sysArchName = null;
|
||||
if (OperatingSystem.CURRENT_OS == OperatingSystem.WINDOWS) {
|
||||
@@ -219,12 +216,6 @@ public enum Architecture {
|
||||
}
|
||||
|
||||
Architecture sysArch = parseArchName(sysArchName);
|
||||
if (sysArch == UNKNOWN) {
|
||||
SYSTEM_ARCH_NAME = CURRENT_ARCH_NAME;
|
||||
SYSTEM_ARCH = CURRENT_ARCH;
|
||||
} else {
|
||||
SYSTEM_ARCH_NAME = sysArchName;
|
||||
SYSTEM_ARCH = sysArch;
|
||||
}
|
||||
SYSTEM_ARCH = sysArch == UNKNOWN ? CURRENT_ARCH : sysArch;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user