Skip to content

Commit ab433c4

Browse files
authored
Log client settings for workspace and global (#744)
## Summary This PR adds both workspace and global client settings at INFO level. Maybe this would be more useful at the server level but this could also reveal some bug on the client side code. ### Preview ``` 2025-04-29 16:06:02.475 [info] Using interpreter: /Users/dhruv/work/astral/ruff-vscode/.venv/bin/python 2025-04-29 16:06:02.477 [info] Workspace settings for /Users/dhruv/playground/ruff: { "nativeServer": "on", "cwd": "/Users/dhruv/playground/ruff", "workspace": "file:///Users/dhruv/playground/ruff", "path": [ "/Users/dhruv/work/astral/ruff/target/debug/ruff" ], "ignoreStandardLibrary": true, "interpreter": [ "/Users/dhruv/work/astral/ruff-vscode/.venv/bin/python" ], "configuration": "/Users/dhruv/playground/ruff/formatter/ruff.toml", "importStrategy": "fromEnvironment", "codeAction": { "fixViolation": { "enable": true }, "disableRuleComment": { "enable": true } }, "lint": { "enable": true, "run": "onType", "args": [], "preview": null, "select": null, "extendSelect": null, "ignore": null }, "format": { "args": [], "preview": null }, "enable": true, "organizeImports": true, "fixAll": true, "showNotifications": "off", "exclude": null, "lineLength": null, "configurationPreference": "editorFirst", "showSyntaxErrors": true, "logLevel": "debug", "logFile": null } 2025-04-29 16:06:02.478 [info] Global settings: { "nativeServer": "on", "cwd": "/", "workspace": "/", "path": [ "/Users/dhruv/work/astral/ruff/target/debug/ruff" ], "ignoreStandardLibrary": true, "interpreter": [], "configuration": "${workspaceFolder}/formatter/ruff.toml", "importStrategy": "fromEnvironment", "codeAction": { "fixViolation": { "enable": true }, "disableRuleComment": { "enable": true } }, "lint": { "enable": true, "run": "onType", "args": [] }, "format": { "args": [] }, "enable": true, "organizeImports": true, "fixAll": true, "showNotifications": "off", "configurationPreference": "editorFirst", "showSyntaxErrors": true, "logLevel": "debug" } 2025-04-29 16:06:02.478 [info] Using 'path' setting: /Users/dhruv/work/astral/ruff/target/debug/ruff 2025-04-29 16:06:02.486 [info] Found Ruff 0.11.7 at /Users/dhruv/work/astral/ruff/target/debug/ruff 2025-04-29 16:06:02.486 [info] Server run command: /Users/dhruv/work/astral/ruff/target/debug/ruff server 2025-04-29 16:06:02.486 [info] Server: Start requested. ```
1 parent 0b3882a commit ab433c4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/common/server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,11 @@ export async function startServer(
450450
updateStatus(undefined, LanguageStatusSeverity.Information, true);
451451

452452
const extensionSettings = await getExtensionSettings(serverId);
453+
for (const settings of extensionSettings) {
454+
logger.info(`Workspace settings for ${settings.cwd}: ${JSON.stringify(settings, null, 4)}`);
455+
}
453456
const globalSettings = await getGlobalSettings(serverId);
457+
logger.info(`Global settings: ${JSON.stringify(globalSettings, null, 4)}`);
454458

455459
let newLSClient = await createServer(
456460
workspaceSettings,

0 commit comments

Comments
 (0)