Add support for "log": "<level>" to the argv.json (fixes #118824)

This commit is contained in:
Christof Marti 2021-03-19 09:59:03 +01:00 committed by GitHub
parent d96f34c867
commit 391b1a6b57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -160,7 +160,10 @@ function configureCommandlineSwitchesSync(cliArgs) {
// TODO@sandbox remove me once testing is done on `vscode-file` protocol
// (all traces of `enable-browser-code-loading` and `ENABLE_VSCODE_BROWSER_CODE_LOADING`)
'enable-browser-code-loading'
'enable-browser-code-loading',
// Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.
'log-level',
];
// Read argv config
@ -205,6 +208,12 @@ function configureCommandlineSwitchesSync(cliArgs) {
process.env['ENABLE_VSCODE_BROWSER_CODE_LOADING'] = argvValue;
}
break;
case 'log-level':
if (typeof argvValue === 'string') {
process.argv.push('--log', argvValue);
}
break;
}
}
});

View file

@ -361,6 +361,10 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
items: {
type: 'string'
}
},
'log-level': {
type: 'string',
description: localize('argv.logLevel', "Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.")
}
}
};