Understanding python.analysis.logLevel in Pylance

June 23, 2026 · View on GitHub

Pylance is a fast and feature-rich language server extension for Python in Visual Studio Code, powered by the Pyright static type checker.

The python.analysis.logLevel setting controls how much detail Pylance writes to its Output panel.

What is python.analysis.logLevel?

Pylance logs information about its activity — startup, environment detection, indexing, and analysis — to the Output panel. logLevel sets the verbosity of that log.

Type: string Default: "Information" Scope: window (applies to the whole VS Code window)

Accepted values

ValueDescription
"Error"Logs only errors.
"Warning"Logs warnings and errors.
"Information"Logs general informational messages, warnings, and errors. This is the default.
"Trace"Logs highly detailed diagnostic output, including the messages above. Useful when troubleshooting.

This setting exists so you can increase verbosity when diagnosing a problem (for example, why a library is not resolving) and reduce it again for normal use.

How to Change python.analysis.logLevel

Using the Settings UI

  1. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Preferences: Open Settings (UI).
  2. Search for python.analysis.logLevel.
  3. Choose a value from the dropdown.

Using settings.json

{
    "python.analysis.logLevel": "Trace"
}

To view the log, open the Output panel (View > Output) and select Python Language Server from the dropdown.

When to Use It

  • Use "Trace" when troubleshooting an issue or preparing a bug report, to capture detailed diagnostic information.
  • Use "Information" (the default) for everyday work.
  • Use "Warning" or "Error" to keep the log quiet once everything is working.

See Also


For more information on Pylance settings and customization, refer to the Pylance Settings and Customization documentation.


This document was generated with the assistance of AI and has been reviewed by humans for accuracy and completeness.