This repository was archived by the owner on Nov 18, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another take on #39 (Add output channel). Currently, from what I looked, there's no way to easily capture protocol messages for debugging/overview purposes, even when running under
DEV_MODE
. So the PR is split into two commits.Firstly, it allows to trace only protocol messages (either information for sent/received messages or also including the formatted contents) by setting appropriate trace verbosity property in LanguageClient (using built-in API) when ran with
DEV_MODE
set totrue
. I set it to Trace.Messages by default (info about the messages, but not including contents), because it made sense for me to display simple trace logs when run underDEV_MODE
, but we could make it completely opt-in.Secondly, it also allows to set RUST_LOG env var when running the server. Not sure if the implementation is good enough, but since the fact that you can provide RUST_LOG to the server is rarely brought up, I just wanted have it there, so people can only toy with setting the desired verbosity when they're hacking on RLS 😄 It's completely opt-in.
If we don't want these two things then maybe we can just introduce one or the other - I didn't want to submit 2 PRs for related things.