Skip to content

Commit 605d062

Browse files
committed
Disable JVM logging
Closes #118 Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent 04d394b commit 605d062

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
"string",
8585
"null"
8686
],
87-
"default": "-Xmx64M -XX:+UseG1GC -XX:+UseStringDeduplication",
88-
"description": "Specifies extra VM arguments used to launch the MicroProfile Language Server. Eg. use `-Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector.",
87+
"default": "-Xmx64M -XX:+UseG1GC -XX:+UseStringDeduplication -Xlog:disable",
88+
"description": "Specifies extra VM arguments used to launch the MicroProfile Language Server. Eg. use `-Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector.",
8989
"scope": "window"
9090
},
9191
"microprofile.tools.trace.server": {

src/languageServer/javaServerStarter.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ function prepareParams(microprofileJavaExtensions: string[]): string[] {
3737
params.push(watchParentProcess + 'false');
3838
}
3939
}
40+
// Disable logging unless the user specifically sets it to a different value.
41+
// Logging can cause issues, since sometimes it writes to standard out.
42+
// See https://github.com/redhat-developer/vscode-java/issues/2577.
43+
if (vmargs.indexOf("-Xlog:") < 0) {
44+
params.push("-Xlog:disable");
45+
}
4046
parseVMargs(params, vmargs);
4147
const serverHome: string = path.resolve(__dirname, '../server');
4248
const microprofileServerFound: Array<string> = glob.sync(`**/${MICROPROFILE_SERVER_NAME}`, { cwd: serverHome });

0 commit comments

Comments
 (0)