Log file settings for Eclipse client

This commit is contained in:
aboyko
2023-04-12 16:48:35 -04:00
parent 5e0e5368f5
commit 6d14fad0e0
8 changed files with 142 additions and 34 deletions

View File

@@ -16,12 +16,9 @@ import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IPath;
import org.springframework.tooling.ls.eclipse.commons.JRE;
import org.springframework.tooling.ls.eclipse.commons.JRE.MissingJDKException;
import org.springframework.tooling.ls.eclipse.commons.LanguageServerCommonsActivator;
import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessStreamConnector;
import org.springframework.tooling.ls.eclipse.commons.preferences.LanguageServerConsolePreferenceConstants;
/**
* @author Martin Lippert
@@ -51,14 +48,6 @@ public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamCon
args.add("-XX:+HeapDumpOnOutOfMemoryError");
args.add("-XX:TieredStopAtLevel=1");
if (!LanguageServerCommonsActivator.getInstance().getPreferenceStore().getBoolean(LanguageServerConsolePreferenceConstants.PREF_BOOT_JAVA_CONSOLE_ENABLED)) {
IPath logFile = BootLanguageServerPlugin.getDefault().getStateLocation().addTrailingSeparator().append("boot-ls.log");
args.add("-Dsts.log.file=" + logFile.toFile().getPath());
}
IPath fatalErrorFile = BootLanguageServerPlugin.getDefault().getStateLocation().addTrailingSeparator().append("fatal-eror-boot-ls.log");
args.add("-XX:ErrorFile=" + fatalErrorFile.toFile().getPath());
addCustomJVMArgs(args);
return args;