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

@@ -13,6 +13,7 @@ package org.springframework.ide.vscode.boot;
import java.io.IOException;
import org.springframework.ide.vscode.commons.languageserver.LaunguageServerApp;
import org.springframework.ide.vscode.commons.util.Log;
/**
* Starts up Language Server process
@@ -24,7 +25,9 @@ import org.springframework.ide.vscode.commons.languageserver.LaunguageServerApp;
public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
LaunguageServerApp.start("boot-properties-language-server",
String serverName = "boot-properties-language-server";
Log.redirectToFile(serverName);
LaunguageServerApp.start(serverName,
() -> new BootPropertiesLanguageServer(BootPropertiesLanguageServerParams.createDefault()));
}