Skip to content

Commit aef3982

Browse files
committed
ANSI colour output for LS console in Eclipse
1 parent c587740 commit aef3982

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eclipse-language-servers/org.springframework.tooling.ls.eclipse.commons/src/org/springframework/tooling/ls/eclipse/commons/STS4LanguageServerProcessStreamConnector.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ private void fillCommand(List<String> command, List<String> extraVmArgs) {
147147
command.add("-Dlogging.file.name=" + pathStr);
148148
}
149149
command.add("-Dlogging.level.root=" + preferenceStore.getString(info.preferenceKeyLogLevel()));
150+
if (getLoggingTarget() == LoggingTarget.CONSOLE) {
151+
command.add("-Dspring.output.ansi.enabled=ALWAYS");
152+
}
150153
command.add("-XX:ErrorFile=" + Platform.getStateLocation(Platform.getBundle(getPluginId())).append("fatal-error-" + info.label().replaceAll("\\s+", "-").toLowerCase() + "_" + System.currentTimeMillis()));
151154
});
152155

@@ -257,7 +260,7 @@ private LoggingTarget getLoggingTarget() {
257260
try {
258261
return LoggingTarget.valueOf(plugin.getPreferenceStore().getString(serverInfo.prefernceKeyLogTarget()));
259262
} catch (Exception e) {
260-
plugin.getLog().error("Cannot determine language srever logging target", e);
263+
plugin.getLog().error("Cannot determine language server logging target", e);
261264
return LoggingTarget.OFF;
262265
}
263266
}

0 commit comments

Comments
 (0)