You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
I mean that the Log level should map to 'trace' no?
-> 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.
@puremourning This absolutely could be interpreted as a VS Code implementation issue, but if that was the case the spec doesn't really give any hint that Debug should be considered a severity between "info" and "log". And it'd also be a very breaking interpretation to consider log to be the lowest severity, since a client filtering out things based on severity would then filter out the messages that previously were conceptually a higher severity.
MessageType (as of 3.18) is defined as:
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.
The text was updated successfully, but these errors were encountered: