microsoft / microsoft/vscode-languageserver-node
VSCode language client should configure logger pointing to the output channel rather than console
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 404
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 14
Description
I recently received a user report of a bug in my language server, but the expected error log did not show in the configured output channel as I expected. Typically I direct users to look into this output channel when reporting issues.
I happened to find the error after I opened Developer: Toggle Developer Tools and saw the error log in the developer console, rather than the output channel:
The logged error was a Received response message without id, and looking at the code this comes from a call to logger.error:
Logger is configurable, and after looking around I found that the client configures the logger as a ConsoleLogger, which is why it ends up going to the developer console:
What do you think about changing this to log into the vscode output channel rather than the console? I believe this will make the logs more visible for debugging
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in client/src/common/client.ts around the ConsoleLogger configuration referenced in the issue, then trace how the client’s VSCode output channel is created and used. Determine how the logger can target that channel instead of the developer console; done means errors such as “Received response message without id” appear in the configured output channel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100