JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions 0.9.3-preview.1

This is a prerelease version of JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions" Version="0.9.3-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions" Version="0.9.3-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
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"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions@0.9.3-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions&version=0.9.3-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=JPSoftworks.CommandPalette.Extensions.Toolkit.Logging.MicrosoftExtensions&version=0.9.3-preview.1&prerelease
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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