Skip to content

MessageType should include a 'trace' severity #2117

Open
@jasonmalinowski

Description

@jasonmalinowski

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:

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions