From 95fce30ec5e2e3489ef30b3092560ae7f4992c0e Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Thu, 22 Sep 2022 11:07:18 -0400 Subject: [PATCH] Disable JVM logging by default. - Since any JVM component may invoke logging, it may be best to disable all logging - Related #2577 - Fixes #2292 Signed-off-by: Roland Grunberg --- package.json | 4 ++-- src/javaServerStarter.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d0c576eed..57bcade76 100644 --- a/package.json +++ b/package.json @@ -213,8 +213,8 @@ "string", "null" ], - "default": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:jni+resolve=off", - "description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:jni+resolve=off` to optimize memory usage with the parallel garbage collector", + "default": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:disable", + "description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:disable` to optimize memory usage with the parallel garbage collector", "scope": "machine-overridable" }, "java.errors.incompleteClasspath.severity": { diff --git a/src/javaServerStarter.ts b/src/javaServerStarter.ts index 718f60f2d..9d1d8b1b7 100644 --- a/src/javaServerStarter.ts +++ b/src/javaServerStarter.ts @@ -112,8 +112,8 @@ function prepareParams(requirements: RequirementsData, javaConfiguration, worksp params.push(`${watchParentProcess}false`); } } - if (vmargs.indexOf('-Xlog:jni+resolve=') < 0) { - params.push('-Xlog:jni+resolve=off'); + if (vmargs.indexOf('-Xlog:') < 0) { + params.push('-Xlog:disable'); } parseVMargs(params, vmargs);