Skip to content

Conversation

@dibarbet
Copy link
Member

@dibarbet dibarbet commented May 8, 2025

Updates LSP logging to log using debug more appropriately, and fixes LSP server logging to not downgrade information logs to debug.

@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 8, 2025
/// TODO - Switch this to call LogInformation once appropriate callers have been changed to LogDebug.
/// </summary>
public override void LogInformation(string message, params object[] @params) => _hostLogger.LogDebug(message, @params);
public override void LogInformation(string message, params object[] @params) => _hostLogger.LogInformation(message, @params);
Copy link
Member Author

Choose a reason for hiding this comment

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

we were previously downgrading all info logs to debug in vscode because information logs were too verbose. That was because originally the lowest LSP logger level was info, and we ended up logging everything as info.

this fixes it by logging info as info, and adjusting the usages of info logging to a more appropriate level.

Copy link
Member

Choose a reason for hiding this comment

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

Oh thank you for finally fixing this!

@dibarbet dibarbet marked this pull request as ready for review May 9, 2025 00:13
@dibarbet dibarbet requested a review from a team as a code owner May 9, 2025 00:13
// what to skip, and what files we have to tell the client have been removed.
var previousResults = GetPreviousResults(diagnosticsParams) ?? [];
context.TraceInformation($"previousResults.Length={previousResults.Length}");
context.TraceDebug($"previousResults.Length={previousResults.Length}");
Copy link
Member

Choose a reason for hiding this comment

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

Not really related to this, but whenever I saw this in the logs it was very unclear what this was related to. Not sure if it should also be prefixed with handlerName or something.

Copy link
Member Author

Choose a reason for hiding this comment

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

it already is prefixed by the method name
image

@dibarbet
Copy link
Member Author

dibarbet commented May 9, 2025

/azp run roslyn-integration-CI

@dibarbet dibarbet enabled auto-merge May 9, 2025 18:02
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dibarbet dibarbet merged commit 7496b67 into dotnet:main May 9, 2025
24 of 25 checks passed
@dibarbet dibarbet deleted the clasp_log branch May 9, 2025 20:49
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone May 9, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants