Log server Info messages only if TRACE is enabled.#1523
Log server Info messages only if TRACE is enabled.#1523raghucssit wants to merge 1 commit intoeclipse-lsp4e:mainfrom
Conversation
5ceca4d to
ba7f377
Compare
There was a problem hiding this comment.
Pull request overview
Adjusts LSP server message logging to avoid polluting the Eclipse Error Log view with low-severity messages unless tracing is explicitly enabled (per issue #1522).
Changes:
- Gate
MessageType.Info(and the switch default branch) logging behindLanguageServerPlugin.isLogTraceEnabled(). - Keep existing behavior for
ErrorandWarningmessages.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (LanguageServerPlugin.isLogTraceEnabled()) { | ||
| LanguageServerPlugin.logInfo(log.toString()); | ||
| } |
There was a problem hiding this comment.
This now gates INFO (and the default branch) behind LanguageServerPlugin.isLogTraceEnabled() (debug option org.eclipse.lsp4e/trace). The shipped org.eclipse.lsp4e/.options currently only declares org.eclipse.lsp4e/debug, so the trace option isn’t discoverable when launching with -debug. Consider adding/documenting org.eclipse.lsp4e/trace in the plugin’s .options (and/or user-facing docs) so users can actually enable these logs when needed.
|
Hi @raghucssit, I don't think it's a good idea to hide these message is general. That being said, I ran into a similar problem with a LS that was logging a lot of messages with INFO level. |
|
I also do not think this is a problem that should be solved by suppressing messages on LSP4E by default. I think #1370 or fixing the offending language server is a better option. |
|
I have moved this filtering to github copilot repo. I will close this as needed later once that pr is merged. |
see #1522