Logs info/default log messages to eclipse logs only if tracing is#25
Logs info/default log messages to eclipse logs only if tracing is#25raghucssit wants to merge 2 commits intomicrosoft:mainfrom
Conversation
enabled. LSP4E by default logs info/default messages to Eclipse logs. But we want to log info only if tracing is enabled. see https://github.com/microsoft/copilot-eclipse-feedback/issues/185
There was a problem hiding this comment.
Pull request overview
This PR adjusts how LSP4E window/logMessage events are forwarded to the Eclipse error log, so that Info/Log messages are only logged when LSP4E tracing is enabled (while still always logging Warning/Error).
Changes:
- Override
CopilotLanguageClient.logMessage(...)to suppressInfo/Logmessages unless tracing is enabled. - Introduce an LSP4E trace check via
Platform.getDebugBoolean("org.eclipse.lsp4e/trace").
| case Log: | ||
| default: | ||
| if (isLsp4eLogTraceEnabled()) { | ||
| super.logMessage(message); | ||
| } |
There was a problem hiding this comment.
New behavior filters out Info/Log messages unless the LSP4E trace debug option is enabled. Since this is behaviorally significant and CopilotLanguageClient already has unit tests, please add/extend tests to verify Error/Warning are always delegated to super.logMessage(...), and Info/Log are only delegated when tracing is enabled.
|
It seems that we need to have a separate PR to bump the version: https://github.com/microsoft/copilot-for-eclipse/blob/main/base.target#L6 first. I will do it and verify that backward compatibility is fine after the bump. |
enabled.
LSP4E by default logs info/default messages to Eclipse logs. But we want to log info only if tracing is enabled.
see #121