diff --git a/src/launchWizard/launchWizard.ts b/src/launchWizard/launchWizard.ts index a90b933c6..5b58989e6 100644 --- a/src/launchWizard/launchWizard.ts +++ b/src/launchWizard/launchWizard.ts @@ -40,6 +40,14 @@ export async function activate(ctx: vscode.ExtensionContext) { ) } +function getAllowedLogLevels(toLower: boolean = false): string[] { + let logLevels: string[] = [] + ;['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'].forEach((logLevel) => { + logLevels.push(toLower ? logLevel.toLowerCase() : logLevel) + }) + return logLevels +} + // Function to get config values function getConfigValues(data, configIndex) { if (data && configIndex !== -1) { @@ -508,7 +516,30 @@ class LaunchWizard { }) let dfdlDebugger: DFDLDebugger = defaultValues.dfdlDebugger + let debuggerLogLevelSelect = '' + let debuggerLogLevelTypes = getAllowedLogLevels() + let debuggerLogLevel = dfdlDebugger.logging.level + + debuggerLogLevelTypes.forEach((type) => { + if (type === debuggerLogLevel) { + debuggerLogLevelSelect += `` + } else { + debuggerLogLevelSelect += `` + } + }) + let dataEditor: DataEditorConfig = defaultValues.dataEditor + let dataEditorLogLevelSelect = '' + let dataEditorLogLevelTypes = getAllowedLogLevels(true) + let dataEditorLogLevel = dataEditor.logging.level + + dataEditorLogLevelTypes.forEach((type) => { + if (type === dataEditorLogLevel) { + dataEditorLogLevelSelect += `` + } else { + dataEditorLogLevelSelect += `` + } + }) return ` @@ -600,7 +631,9 @@ class LaunchWizard {

Log Level:

- +
@@ -710,7 +743,9 @@ class LaunchWizard {

Log Level:

- +

diff --git a/yarn.lock b/yarn.lock index ef6c3c863..615b12862 100644 --- a/yarn.lock +++ b/yarn.lock @@ -782,11 +782,6 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== - acorn-walk@^8.1.1: version "8.2.0" resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz"