From 7bc0347e2742a968944a2a7a5092b103e0e78408 Mon Sep 17 00:00:00 2001 From: Justin Grote Date: Thu, 14 Nov 2024 11:23:10 -0800 Subject: [PATCH] Remove LanguageServerLogging from DebugAdapter factory --- .../Hosting/EditorServicesServerFactory.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/PowerShellEditorServices/Hosting/EditorServicesServerFactory.cs b/src/PowerShellEditorServices/Hosting/EditorServicesServerFactory.cs index 60cefceaf..b981ea450 100644 --- a/src/PowerShellEditorServices/Hosting/EditorServicesServerFactory.cs +++ b/src/PowerShellEditorServices/Hosting/EditorServicesServerFactory.cs @@ -8,7 +8,6 @@ using Microsoft.PowerShell.EditorServices.Server; using OmniSharp.Extensions.LanguageServer.Protocol.Server; using Microsoft.PowerShell.EditorServices.Services.Extension; -using OmniSharp.Extensions.LanguageServer.Server; // The HostLogger type isn't directly referenced from this assembly, however it uses a common IObservable interface and this alias helps make it more clear the purpose. We can use Microsoft.Extensions.Logging from this point because the ALC should be loaded, but we need to only expose the IObservable to the Hosting assembly so it doesn't try to load MEL before the ALC is ready. using HostLogger = System.IObservable<(int logLevel, string message)>; @@ -103,7 +102,6 @@ public PsesDebugServer CreateDebugServerForTempSession( ServiceProvider serviceProvider = new ServiceCollection() .AddLogging(builder => builder .ClearProviders() - .AddLanguageProtocolLogging() .SetMinimumLevel(LogLevel.Trace)) // TODO: Why randomly set to trace? .AddSingleton(_ => null) // TODO: Why add these for a debug server?!