JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions
0.9.3-preview.1
dotnet add package JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions --version 0.9.3-preview.1
NuGet\Install-Package JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions -Version 0.9.3-preview.1
<PackageReference Include="JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions" Version="0.9.3-preview.1" />
<PackageVersion Include="JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions" Version="0.9.3-preview.1" />
<PackageReference Include="JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions" />
paket add JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions --version 0.9.3-preview.1
#r "nuget: JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions, 0.9.3-preview.1"
#:package JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions@0.9.3-preview.1
#addin nuget:?package=JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions&version=0.9.3-preview.1&prerelease
#tool nuget:?package=JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions&version=0.9.3-preview.1&prerelease
Microsoft.Extensions.Logging adapter
This package bridges Command Palette extension host diagnostics and Microsoft.Extensions.Logging without making
that abstraction a dependency of the main toolkit. The extension owns and disposes its ILoggerFactory.
Use one application-owned factory for runner and extension diagnostics:
var parameters = new ExtensionHostRunnerParameters
{
PublisherMoniker = "MyCompany",
ProductMoniker = "MyExtension",
};
var host = ExtensionHostConfiguration.Resolve(args, parameters);
using var loggerFactory = LoggerFactory.Create(builder =>
builder
.AddDailyFile(host)
.AddCommandPalette(host));
await ExtensionHostRunner.CreateBuilder(host)
.AddHostedExtensionFactory(context =>
new MyExtension(
context.ExtensionDisposedEvent,
loggerFactory))
.UseMicrosoftExtensionsLogging(loggerFactory)
.RunAsync();
ExtensionHostConfiguration.Resolve applies the Toolkit's -Debug convention and canonical local-app-data log path
once. AddDailyFile and AddCommandPalette consume that immutable configuration, register only the destinations the
application selected, and apply the effective level. The factory owns and disposes providers registered by these
extensions.
UseMicrosoftExtensionsLogging replaces the Toolkit's default sinks and forwards host diagnostics into the supplied
factory while preserving categories. Explicitly added runner sinks remain active, and ILoggerFactory fans each
event out to all registered destinations.
The concrete DailyFileLoggerProvider and CommandPaletteLoggerProvider types remain available for advanced use.
Provider instances passed directly to AddProvider remain caller-owned and should be disposed after the factory.
Trace and critical levels map to the Toolkit's debug and error levels respectively.
Bridge markers bound accidental feedback when both adapters are connected to the same logging pipeline.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-windows10.0.22621 is compatible. net10.0-windows was computed. net10.0-windows10.0.22621 is compatible. |
-
net10.0-windows10.0.22621
- JPSoftworks.CommandPalette.Extensions.Toolkit (>= 0.9.3-preview.1)
- JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.Abstractions (>= 0.9.3-preview.1)
- Microsoft.Extensions.Logging (>= 10.0.10)
-
net9.0-windows10.0.22621
- JPSoftworks.CommandPalette.Extensions.Toolkit (>= 0.9.3-preview.1)
- JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.Abstractions (>= 0.9.3-preview.1)
- Microsoft.Extensions.Logging (>= 9.0.18)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.3-preview.1 | 29 | 7/31/2026 |