diff --git a/src/main.js b/src/main.js index 2db5485da2d..8a27a5a5be1 100644 --- a/src/main.js +++ b/src/main.js @@ -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; } } }); diff --git a/src/vs/workbench/electron-sandbox/desktop.contribution.ts b/src/vs/workbench/electron-sandbox/desktop.contribution.ts index 299561eb5e1..98d69ceece0 100644 --- a/src/vs/workbench/electron-sandbox/desktop.contribution.ts +++ b/src/vs/workbench/electron-sandbox/desktop.contribution.ts @@ -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'.") } } };