Remove extra logging added for debugging an issue

This commit is contained in:
aboyko
2023-04-01 11:43:13 -04:00
parent 216b4731de
commit 97a8297e65
4 changed files with 6 additions and 14 deletions

View File

@@ -40,7 +40,6 @@ public class BootProjectTracker {
@Override
public void classpathChanged(IJavaProject jp) {
logger.log("Classpath changed for project: " + jp.getElementName());
processProject(jp);
}
});
@@ -57,12 +56,10 @@ public class BootProjectTracker {
private void processProject(IJavaProject jp) {
if (isSpringProject(jp)) {
if (springProjects.add(jp)) {
logger.log("Boot project ADDED: " + jp.getElementName());
fireEvent();
}
} else {
if (springProjects.remove(jp)) {
logger.log("Boot project REMOVED: " + jp.getElementName());
fireEvent();
}
}

View File

@@ -43,15 +43,11 @@ public class JdtLsExtensionPlugin extends Plugin {
bootProjectPresent = currentBootProjectsPresent;
try {
if (bootProjectPresent) {
logger.log("About to START Boot LS since Boot project has been detected in the workspace");
JavaLanguageServerPlugin.getInstance().getClientConnection()
.executeClientCommand("vscode-spring-boot.ls.start");
logger.log("Boot LS START command executed successfully");
} else {
logger.log("About to STOP Boot LS since no Boot projects have been detected in the workspace");
JavaLanguageServerPlugin.getInstance().getClientConnection()
.executeClientCommand("vscode-spring-boot.ls.stop");
logger.log("Boot LS STOP command executed successfully");
}
} catch (Exception e) {
logger.log(e);

View File

@@ -258,17 +258,16 @@ public class JdtLsProjectCache implements InitializableJavaProjectsService, Serv
@Override
public Mono<Disposable> initialize() {
return Mono.defer(() -> {
log.info("INIT ADD CLASSPATH LISTENER enableClasspath=" + initialClasspathLisetnerEnable);
log.debug("ADD CLASSPATH LISTENER enableClasspath=" + initialClasspathLisetnerEnable);
enableClasspathListener(initialClasspathLisetnerEnable);
return Mono.just(DISPOSABLE);
});
}
private synchronized void enableClasspathListener(boolean enabled) {
log.info("enableClasspathListener(" + enabled + ") called. Current enablement = " + classpathListenerEnabled);
if (classpathListenerEnabled != enabled) {
if (enabled) {
log.info("Adding classpath listener enabled=" + enabled);
log.debug("Adding classpath listener enabled=" + enabled);
classpathListenerEnabled = true;
notifyProjectObserverSupported();
classpathListenerRequest = server.addClasspathListener(CLASSPATH_LISTENER).timeout(INITIALIZE_TIMEOUT)
@@ -287,7 +286,7 @@ public class JdtLsProjectCache implements InitializableJavaProjectsService, Serv
}
});
} else {
log.info("Removing classpath listener enabled=" + enabled);
log.debug("Removing classpath listener enabled=" + enabled);
DISPOSABLE.update(Disposables.single());
classpathListenerRequest = null;
classpathListenerEnabled = false;
@@ -313,10 +312,10 @@ public class JdtLsProjectCache implements InitializableJavaProjectsService, Serv
if (!supported) {
throw new IllegalStateException("Classpath listening not supported.");
} else {
log.info("CLASSPATH ENABLED CMD EXEC");
log.debug("CLASSPATH ENABLED CMD EXEC");
if (params.getArguments().get(0) instanceof JsonPrimitive) {
boolean classpathListeningEnabled = ((JsonPrimitive)params.getArguments().get(0)).getAsBoolean();
log.info("CMD - Enable classpath listening: " + classpathListeningEnabled);
log.debug("CMD - Enable classpath listening: " + classpathListeningEnabled);
enableClasspathListener(classpathListeningEnabled);
}
}

View File

@@ -8,7 +8,7 @@ languageserver.completion-trigger-characters.spring-boot-properties: abcdefghijk
spring.main.banner-mode: off
logging.level.org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessCommandHandler=error
logging.level.org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache=info
logging.level.org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache=error
#logging.level.org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer=debug
#logging.level.org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava=debug