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
| Value | Description |
|---|---|
"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
- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) and run Preferences: Open Settings (UI). - Search for
python.analysis.logLevel. - 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.
Related Settings
python.analysis.diagnosticMode— controls how much of your project Pylance analyzes.
See Also
- Reading Pylance Logs — how to find, read, and use Pylance's logs.
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.