Added documentation for python.analysis.logLevel setting.

This commit is contained in:
Eric Traut 2020-06-18 21:40:43 -07:00
parent 5b187d19fa
commit cf794e30d5
3 changed files with 38 additions and 21 deletions

View File

@ -66,15 +66,6 @@
"type": "object",
"title": "Pyright",
"properties": {
"python.analysis.typeshedPaths": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Paths to look for typeshed modules.",
"scope": "resource"
},
"python.analysis.autoSearchPaths": {
"type": "boolean",
"default": true,
@ -106,16 +97,24 @@
"description": "Allows a user to override the severity levels for individual diagnostics.",
"scope": "resource"
},
"python.pythonPath": {
"python.analysis.logLevel": {
"type": "string",
"default": "python",
"description": "Path to Python, you can use a custom version of Python.",
"scope": "resource"
"default": "info",
"description": "Specifies the level of logging for the Output panel",
"enum": [
"error",
"warning",
"info",
"trace"
]
},
"python.venvPath": {
"type": "string",
"default": "",
"description": "Path to folder with a list of Virtual Environments.",
"python.analysis.typeshedPaths": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Paths to look for typeshed modules.",
"scope": "resource"
},
"pyright.disableLanguageServices": {
@ -130,10 +129,10 @@
"description": "Disables the “Organize Imports” command.",
"scope": "resource"
},
"pyright.useLibraryCodeForTypes": {
"type": "boolean",
"default": false,
"description": "Use library implementations to extract type information when type stub is not present.",
"python.pythonPath": {
"type": "string",
"default": "python",
"description": "Path to Python, you can use a custom version of Python.",
"scope": "resource"
},
"pyright.typeCheckingMode": {
@ -146,6 +145,18 @@
],
"description": "Defines the default rule set for type checking.",
"scope": "resource"
},
"pyright.useLibraryCodeForTypes": {
"type": "boolean",
"default": false,
"description": "Use library implementations to extract type information when type stub is not present.",
"scope": "resource"
},
"python.venvPath": {
"type": "string",
"default": "",
"description": "Path to folder with a list of Virtual Environments.",
"scope": "resource"
}
}
},

View File

@ -18,6 +18,8 @@ The Pyright VS Code extension honors the following settings.
**python.analysis.extraPaths** [array of paths]: Paths to add to the default execution environment extra paths if there are no execution environments defined in the config file.
**python.analysis.logLevel** ["error", "warning", "info", or "trace"]: Level of logging for Output panel. The default value for this option is "info".
**python.analysis.stubPath** [path]: Path to directory containing custom type stub files.
**python.analysis.diagnosticMode** ["openFilesOnly", "workspace"]: Determines whether pyright analyzes (and reports errors for) all files in the workspace, as indicated by the config file. If this option is set to "openFilesOnly", pyright analyzes only open files.

View File

@ -862,12 +862,16 @@ export abstract class LanguageServerBase implements LanguageServerInterface {
switch (logLevel.toLowerCase()) {
case 'error':
return LogLevel.Error;
case 'warning':
return LogLevel.Warn;
case 'info':
return LogLevel.Info;
case 'trace':
return LogLevel.Log;
default:
return LogLevel.Info;
}