Skip to content
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

lsp: enable levelled logging #1188

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Conversation

charlieegan3
Copy link
Member

We have been having a hard time debugging test suite issues like this one: https://github.com/StyraInc/regal/actions/runs/11233013451/job/31225814604 where the order of events doesn't appear to follow the order expected based on the implementation.

This PR makes an improvement to the Language Server to support logging of messages at different levels.

This retains the old behaviour in a new model, but then also adds a number of debug messages for requests and diagnostics jobs to aid in debugging tests.

In future, we may wish for more log levels, but for now, I have used the three available in the LSP TraceValues.

Levels can be used to control how verbose the server logging is.

Signed-off-by: Charlie Egan <charlie@styra.com>
Signed-off-by: Charlie Egan <charlie@styra.com>
@charlieegan3 charlieegan3 changed the title Lsp logging lsp: enable levelled logging Oct 8, 2024
Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

Nice!

@charlieegan3 charlieegan3 merged commit 1dbfc7e into StyraInc:main Oct 9, 2024
4 checks passed
@charlieegan3 charlieegan3 deleted the lsp-logging branch October 9, 2024 09:19
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