microsoft / microsoft/language-server-protocol
MessageType should include a 'trace' severity
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
MessageType (as of 3.18) is defined as:
export namespace MessageType {
/**
* An error message.
*/
export const Error = 1;
/**
* A warning message.
*/
export const Warning = 2;
/**
* An information message.
*/
export const Info = 3;
/**
* A log message.
*/
export const Log = 4;
/**
* A debug message.
*
* @since 3.18.0
*/
export const Debug = 5;
}
export type MessageType = 1 | 2 | 3 | 4 | 5;
The "debug" addition is handy, but it'd be great if one more level, 'trace' was also added. VS Code's newish support for logging output window has a distinction of debug versus trace:
And .NET's logging library similarly has a debug vs. trace distinction in this enum:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.loglevel?view=net-9.0-pp
As it stands, for us to report 'trace' events with the standard logging API, we're mapping those back to 'debug' which is slightly confusing when we're comparing logs from other sources. Given both sides have a 'trace' concept it'd be nice if we could just use it.
As we discovered, the generic 'log' message type doesn't really mean trace, but rather it has no severity, and it gets logged by the VS Code LSP client without any severity tag at all.
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
Locate the MessageType definition in the TypeScript protocol sources and review how its constants and union type are tested or published. Check the existing Debug addition and the referenced VS Code client behavior before assessing compatibility. Done means the protocol exposes a distinct trace severity without changing the meaning of Log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100