diff --git a/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs b/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs index e9d9a06e2..0b22ddd95 100644 --- a/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs +++ b/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs @@ -68,7 +68,7 @@ public void Log( { messagePrepend = logLevel switch { - LogLevel.Critical => " CRITICAL: ", + LogLevel.Critical => "CRITICAL: ", LogLevel.Error => "", LogLevel.Warning => "", LogLevel.Information => "", @@ -76,6 +76,12 @@ public void Log( LogLevel.Trace => "", _ => string.Empty }; + + // The vscode formatter prepends some extra stuff to Info specifically, so we drop Info to Log, but it will get logged correctly on the other side thanks to our inline indicator that our custom parser on the other side will pick up and process. + if (messageType == MessageType.Info) + { + messageType = MessageType.Log; + } } LogMessageParams logMessage = new()