From b5768f3b6f0e0336bf98bd163f22f4c6f4b2bae9 Mon Sep 17 00:00:00 2001 From: Itamar Lencovsky <4740959+eitamal@users.noreply.github.com> Date: Sat, 21 Jun 2025 20:48:40 +1000 Subject: [PATCH 1/2] Add missing MEL log levels to the LogLevel parameter in Start-EditorServices.ps1 (#2235) This commit adds `Trace`, `Debug`, `Information`, `Critical`, and `None` to the validation set on the `LogLevel` parameter when starting PSES using `Start-EditorServices.ps1` to allow for the adoption of the newer MEL log levels. --- module/PowerShellEditorServices/Start-EditorServices.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/PowerShellEditorServices/Start-EditorServices.ps1 b/module/PowerShellEditorServices/Start-EditorServices.ps1 index 3e445679a..827169a9d 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()] From 6d9c4acb20d60a59f0d497c8d88c3ea51dfb1c46 Mon Sep 17 00:00:00 2001 From: Justin Grote Date: Tue, 22 Jul 2025 20:22:40 -0700 Subject: [PATCH 2/2] Add legacy log level translations --- module/PowerShellEditorServices/Start-EditorServices.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/module/PowerShellEditorServices/Start-EditorServices.ps1 b/module/PowerShellEditorServices/Start-EditorServices.ps1 index 827169a9d..c61503c65 100644 --- a/module/PowerShellEditorServices/Start-EditorServices.ps1 +++ b/module/PowerShellEditorServices/Start-EditorServices.ps1 @@ -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