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:
- +Log Level:
- +