File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ public abstract class BaseLanguageServer {
8787 private static final @ Nullable PrintStream capturedOut ;
8888 private static final @ Nullable InputStream capturedIn ;
8989 private static final boolean DEPLOY_MODE ;
90+ private static final String LOG_CONFIGURATION_KEY = "log4j2.configurationFactory" ;
9091
9192 static {
9293 DEPLOY_MODE = System .getProperty ("rascal.lsp.deploy" , "false" ).equalsIgnoreCase ("true" );
@@ -102,6 +103,8 @@ public abstract class BaseLanguageServer {
102103 capturedOut = null ;
103104 }
104105 System .setProperty ("java.util.logging.manager" , "org.apache.logging.log4j.jul.LogManager" );
106+ // Do not overwrite existing settings (e.g. passed by the extension)
107+ System .setProperty (LOG_CONFIGURATION_KEY , System .getProperty (LOG_CONFIGURATION_KEY , LogRedirectConfiguration .class .getName ()));
105108 }
106109
107110 // hide implicit constructor
You can’t perform that action at this time.
0 commit comments