Skip to content

Add yaml.trace.server log-level setting to control output channel verbosity #1265

Description

@chirag127

Problem

The YAML extension's output channel currently logs at a fixed verbosity level. In large workspaces with many YAML files, the output channel fills up with repetitive schema-fetch and parse messages, making it hard to spot real errors. There is no way to set the log level to error-only without resorting to hacking yaml.trace.server = 'off' (which disables all server communication logging including errors).

What Users Want

A setting like:

"yaml.logLevel": "error" // "off" | "error" | "warning" | "info" | "verbose"
  • "error" — only show errors in the output channel (good for daily use)
  • "warning" — errors + warnings
  • "info" — default, current behaviour
  • "verbose" — full LSP traffic (debugging aid)

Why Additive

The existing yaml.trace.server is an LSP-level raw traffic trace, not a semantic log level. Many users who want quieter output would use trace = 'off' and then miss real errors. A semantic log-level setting solves this without affecting LSP protocol observability.

Proposed Implementation

  1. Add yaml.logLevel to package.json contributes.configuration with enum and default "info".
  2. Pass the value to the language server via initializationOptions.
  3. In the server, gate each connection.console.log call behind a level check.

Environment

  • VS Code: 1.89+, large monorepo with 200+ YAML files
  • Extension: redhat.vscode-yaml latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions