Meziantou.Extensions.Logging.Xunit 3.0.1

Prefix Reserved
dotnet add package Meziantou.Extensions.Logging.Xunit --version 3.0.1
                    
NuGet\Install-Package Meziantou.Extensions.Logging.Xunit -Version 3.0.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="Meziantou.Extensions.Logging.Xunit" Version="3.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Extensions.Logging.Xunit" Version="3.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Extensions.Logging.Xunit" />
                    
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 Meziantou.Extensions.Logging.Xunit --version 3.0.1
                    
#r "nuget: Meziantou.Extensions.Logging.Xunit, 3.0.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 Meziantou.Extensions.Logging.Xunit@3.0.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=Meziantou.Extensions.Logging.Xunit&version=3.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Extensions.Logging.Xunit&version=3.0.1
                    
Install as a Cake Tool

Meziantou.Extensions.Logging.Xunit

ILogger logger = XUnitLogger.CreateLogger(testOutputHelper);
ILogger<MyType> logger = XUnitLogger.CreateLogger<MyType>(testOutputHelper);

If you are using a WebApplicationFactory:

public class UnitTest1(ITestOutputHelper testOutputHelper)
{
    [Fact]
    public async Task Test1()
    {
        using var factory = new WebApplicationFactory<Program>()
            .WithWebHostBuilder(builder =>
            {
                builder.ConfigureLogging(builder =>
                {
                    // You can override the logging configuration if needed
                    //builder.SetMinimumLevel(LogLevel.Trace);
                    //builder.AddFilter(_ => true);

                    // Register the xUnit logger provider
                    builder.Services.AddSingleton<ILoggerProvider>(new XUnitLoggerProvider(testOutputHelper, appendScope: false));
                });
            });
    }
}

Blog post about this package: How to write logs from ILogger to xUnit.net ITestOutputHelper

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Meziantou.Extensions.Logging.Xunit:

Package Downloads
Drammer.Web.IntegrationTesting

Integration testing framework for the Drammer whisky app.

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on Meziantou.Extensions.Logging.Xunit:

Repository Stars
JasperFx/wolverine
Supercharged .NET server side development!
kerryjiang/WebSocket4Net
A popular .NET WebSocket Client
NikiforovAll/keycloak-authorization-services-dotnet
Authentication and Authorization with Keycloak and ASP.NET Core 🔐
LittleLittleCloud/StepWise
A C# framework to build, visualize and execute event-driven workflow
marinasundstrom/YourBrand
Prototype enterprise system for e-commerce and consulting services
Version Downloads Last Updated
3.0.1 597 8/9/2026
3.0.0 11,711 7/5/2026
2.0.3 8,304 6/28/2026
2.0.2 8,892 6/13/2026
2.0.1 14,328 5/14/2026
2.0.0 13,375 5/6/2026
1.0.27 25,827 4/25/2026
1.0.26 15,965 3/29/2026
1.0.25 19,543 3/15/2026
1.0.24 13,987 2/22/2026
1.0.23 57,221 1/18/2026
1.0.22 22,762 12/28/2025
1.0.21 7,486 12/14/2025
1.0.20 40,486 11/16/2025
1.0.19 85,073 10/19/2025
1.0.18 59,673 9/16/2025
1.0.17 14,178 9/3/2025
1.0.16 34,557 8/10/2025
1.0.15 36,414 7/27/2025
1.0.14 22,124 7/13/2025
Loading failed