Skip to content

Upgrade the LSP client library for better logging support #8281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jasonmalinowski
Copy link
Member

@jasonmalinowski jasonmalinowski commented May 12, 2025

10.0.0-next.15 brings full support for LogOutputChannels which cleans up the logging of severities and timestamps. Otherwise we end up with confusing duplicate severities being listed with duplicate timestamps.

This support was added in microsoft/vscode-languageserver-node#1630.

@jasonmalinowski jasonmalinowski requested review from a team as code owners May 12, 2025 21:53
10.0.0-next.15 brings full support for LogOutputChannels which cleans
up the logging of severities and timestamps. Otherwise we end up with
confusing duplicate severities being listed with duplicate timestamps.
@jasonmalinowski jasonmalinowski force-pushed the use-loggeroutputchannel branch from da1bf73 to e7eae1b Compare May 12, 2025 21:54
@@ -15,7 +15,8 @@
"group": {
"kind": "build",
"isDefault": true
}
},
"problemMatcher": "$tsc-watch",
Copy link
Member

Choose a reason for hiding this comment

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

What was mandating this? And is tsc-watch correct even if we're not doing a live watch?

Copy link
Member Author

Choose a reason for hiding this comment

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

What was mandating this?

Me wanting errors to appear when I hit F5 and it failed to build.

And is tsc-watch correct even if we're not doing a live watch?

Ah good call. Will fix.

@@ -51,8 +51,7 @@ export async function activateRoslynLanguageServer(
// Create a channel for outputting general logs from the language server.
_channel = outputChannel;
// Create a separate channel for outputting trace logs - these are incredibly verbose and make other logs very difficult to see.
// The trace channel verbosity is controlled by the _channel verbosity.
_traceChannel = vscode.window.createOutputChannel(vscode.l10n.t('C# LSP Trace Logs'));
_traceChannel = vscode.window.createOutputChannel(vscode.l10n.t('C# LSP Trace Logs'), { log: true });
Copy link
Member

Choose a reason for hiding this comment

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

A slightly interesting question. Now that both of these are logger output windows, do we now have a separate log level configuration for the trace window?

Previously I manually tied it to the C# output window log level (by detecting changes to the level, and updating the LSP clients trace level), but maybe we shouldn't do that any more?

If so, we should remove the code that updates the trace log level based on the C# output window level, and update Support.md to mention how to get the trace lgos.

Copy link
Member Author

Choose a reason for hiding this comment

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

They both have a setting now yes. I was still noticing that it seemed I had to set the setting for the base one to also get the other one. Where is that code?

Copy link
Member

Choose a reason for hiding this comment

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

@jasonmalinowski jasonmalinowski self-assigned this May 13, 2025
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.

2 participants