Skip to content

Logs info/default log messages to eclipse logs only if tracing is#25

Open
raghucssit wants to merge 2 commits intomicrosoft:mainfrom
raghucssit:filter_info_logs_trace
Open

Logs info/default log messages to eclipse logs only if tracing is#25
raghucssit wants to merge 2 commits intomicrosoft:mainfrom
raghucssit:filter_info_logs_trace

Conversation

@raghucssit
Copy link
Copy Markdown

enabled.

LSP4E by default logs info/default messages to Eclipse logs. But we want to log info only if tracing is enabled.

see #121

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
Copilot AI review requested due to automatic review settings April 27, 2026 15:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 suppress Info/Log messages unless tracing is enabled.
  • Introduce an LSP4E trace check via Platform.getDebugBoolean("org.eclipse.lsp4e/trace").

Comment on lines +406 to +410
case Log:
default:
if (isLsp4eLogTraceEnabled()) {
super.logMessage(message);
}
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot generated this review using guidance from repository custom instructions.
@jdneo
Copy link
Copy Markdown
Member

jdneo commented Apr 29, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants