Class ScrubbingLanguageServerLoggerProvider
A drop-in replacement for OmniSharp's AddLanguageProtocolLogging(): forwards a server
component's internal log records to its LSP client as window/logMessage notifications, but
scrubs every forwarded message through SourcePathAnonymizer first so a caught
exception's stack cannot carry a build-machine source path off the machine. The unredacted record
still reaches the component's own file log.
public sealed class ScrubbingLanguageServerLoggerProvider : ILoggerProvider, IDisposable
- Inheritance
-
ScrubbingLanguageServerLoggerProvider
- Implements
- Inherited Members
Constructors
ScrubbingLanguageServerLoggerProvider(ILanguageServerFacade, IOptions<SdkServerOptions>)
A drop-in replacement for OmniSharp's AddLanguageProtocolLogging(): forwards a server
component's internal log records to its LSP client as window/logMessage notifications, but
scrubs every forwarded message through SourcePathAnonymizer first so a caught
exception's stack cannot carry a build-machine source path off the machine. The unredacted record
still reaches the component's own file log.
public ScrubbingLanguageServerLoggerProvider(ILanguageServerFacade languageServer, IOptions<SdkServerOptions> serverOptions)
Parameters
languageServerILanguageServerFacadeThe facade whose
window/logMessagechannel carries the forwarded records.serverOptionsIOptions<SdkServerOptions>Supplies WireErrorDetail — how a forwarded source path is rewritten.
Methods
CreateLogger(string)
Creates a new ILogger instance.
public ILogger CreateLogger(string categoryName)
Parameters
categoryNamestringThe category name for messages produced by the logger.
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()