Second attempt to redirect log output to file

First attempt was flawed because some loggers can get instantiated
before sysem property is set.
This commit is contained in:
Kris De Volder
2017-11-17 15:49:00 -08:00
parent b95b69db49
commit cd2ab7de28
7 changed files with 34 additions and 15 deletions

View File

@@ -14,12 +14,15 @@ package org.springframework.ide.vscode.concourse;
import java.io.IOException;
import org.springframework.ide.vscode.commons.languageserver.LaunguageServerApp;
import org.springframework.ide.vscode.commons.util.Log;
import org.springframework.ide.vscode.commons.yaml.completion.YamlCompletionEngineOptions;
public class Main {
private static final YamlCompletionEngineOptions OPTIONS = YamlCompletionEngineOptions.DEFAULT;
public static void main(String[] args) throws IOException, InterruptedException {
LaunguageServerApp.start("concourse-language-server", () -> new ConcourseLanguageServer(OPTIONS));
String serverName = "concourse-language-server";
Log.redirectToFile(serverName);
LaunguageServerApp.start(serverName, () -> new ConcourseLanguageServer(OPTIONS));
}
}