Skip to content

Commit d37f934

Browse files
committed
Log environment of language servers at startup
1 parent 262f34f commit d37f934

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

integration/vscode/ada/src/clients.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,21 @@ export function createClient(
5050
}
5151
}
5252

53-
logger.debug(`Using ALS at: ${serverExecPath}`);
53+
logger.info(`Using ALS at: ${serverExecPath}`);
5454

5555
// Copy this process's environment
5656
const serverEnv: NodeJS.ProcessEnv = { ...process.env };
5757
// Set custom environment
5858
setCustomEnvironment(serverEnv);
5959

60+
logger.debug(`Environment for ${name}:`);
61+
for (const key in serverEnv) {
62+
const value = serverEnv[key];
63+
if (value) {
64+
logger.debug(`${key}=${value}`);
65+
}
66+
}
67+
6068
// Options to control the server
6169
const serverOptions: ServerOptions = {
6270
run: { command: serverExecPath, args: extra, options: { env: serverEnv } },

integration/vscode/ada/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ async function activateExtension(context: vscode.ExtensionContext) {
130130
// Log the environment that the extension (and all VS Code) will be using
131131
const customEnv = getEvaluatedCustomEnv();
132132
if (customEnv && Object.keys(customEnv).length > 0) {
133-
logger.info('Custom environment variables:');
133+
logger.info(`Custom environment variables from ${getCustomEnvSettingName()}`);
134134
for (const varName in customEnv) {
135135
const varValue: string = customEnv[varName];
136136
logger.info(`${varName}=${varValue}`);

0 commit comments

Comments
 (0)