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

@@ -16,11 +16,14 @@ import org.springframework.ide.vscode.bosh.models.BoshCommandCloudConfigProvider
import org.springframework.ide.vscode.bosh.models.BoshCommandReleasesProvider;
import org.springframework.ide.vscode.bosh.models.BoshCommandStemcellsProvider;
import org.springframework.ide.vscode.commons.languageserver.LaunguageServerApp;
import org.springframework.ide.vscode.commons.util.Log;
public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
String serverName = "bosh-language-server";
Log.redirectToFile(serverName);
BoshCliConfig cliConfig = new BoshCliConfig();
LaunguageServerApp.start("bosh-language-server", () -> new BoshLanguageServer(
LaunguageServerApp.start(serverName, () -> new BoshLanguageServer(
cliConfig,
new BoshCommandCloudConfigProvider(cliConfig),
new BoshCommandStemcellsProvider(cliConfig),