diff --git a/module/PowerShellEditorServices/Start-EditorServices.ps1 b/module/PowerShellEditorServices/Start-EditorServices.ps1 index 3e445679a..c61503c65 100644 --- a/module/PowerShellEditorServices/Start-EditorServices.ps1 +++ b/module/PowerShellEditorServices/Start-EditorServices.ps1 @@ -46,7 +46,7 @@ param( [ValidateNotNullOrEmpty()] $LogPath, - [ValidateSet("Diagnostic", "Verbose", "Normal", "Warning", "Error")] + [ValidateSet("Diagnostic", "Verbose", "Normal", "Warning", "Error", "Trace", "Debug", "Information", "Critical", "None")] $LogLevel, [ValidateNotNullOrEmpty()] @@ -107,5 +107,13 @@ param( $DebugServiceOutPipeName ) +#Translate legacy PSES log levels to MEL levels +$LogLevel = switch ($LogLevel) { + 'Diagnostic' { 'Trace' } + 'Verbose' { 'Debug' } + 'Normal' { 'Information' } + default { $LogLevel } +} + Import-Module -Name "$PSScriptRoot/PowerShellEditorServices.psd1" Start-EditorServices @PSBoundParameters