Skip to content

Logger backend for language server and fixes for debugger #746

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

Merged
merged 20 commits into from
Oct 12, 2022

Conversation

lukaszsamson
Copy link
Collaborator

This PR adds logger backend using LSP that translates elixir logger levels to LSP. Thanks to that proper logging metadata is displayed in client. Before that all messages was logged as debug. See spec details here
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_logMessage
Furthermore, I did some cleanup and unification of how we log and show notifications. (relevant spec here
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showMessage). I especially made sure that we try to show a message before crashing (#741).

I also looked into how we log in debugger and it turned out it was wrong. DAP reserves stdout and stderr for debuggee and debugger should use only console and important. Up until now we were emitting everything as stdout|err. (see https://microsoft.github.io/debug-adapter-protocol/specification#Events_Output).

@lukaszsamson lukaszsamson merged commit d8642c7 into master Oct 12, 2022
@lukaszsamson lukaszsamson deleted the logger-backend branch October 12, 2022 22:36
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.

1 participant