Meziantou.Extensions.Logging.Xunit.v3 2.0.1

Prefix Reserved
dotnet add package Meziantou.Extensions.Logging.Xunit.v3 --version 2.0.1
                    
NuGet\Install-Package Meziantou.Extensions.Logging.Xunit.v3 -Version 2.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.v3" Version="2.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.v3" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Extensions.Logging.Xunit.v3" />
                    
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.v3 --version 2.0.1
                    
#r "nuget: Meziantou.Extensions.Logging.Xunit.v3, 2.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.v3@2.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.v3&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Extensions.Logging.Xunit.v3&version=2.0.1
                    
Install as a Cake Tool

Meziantou.Extensions.Logging.Xunit.v3

Statically create XUnitLogger or XUnitLogger<T>

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

Statically create XUnitLogger or XUnitLogger<T> by passing an existing ITestOutputHelper

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

Using WebApplicationFactory

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 net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
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.v3:

Package Downloads
TwoRivers.Testing

Framework and tools for implementing applications by following best practices in a developer friendly way. Built from commit 59db18f48398b711c50e16d5da7aacc2e0e6f014 https://github.com/TwoRiversIT/AppFramework/commit/59db18f48398b711c50e16d5da7aacc2e0e6f014

GitHub repositories (2)

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

Repository Stars
kerryjiang/SuperSocket
SuperSocket is a high-performance, extensible socket server application framework for .NET. It provides a robust architecture for building custom network communication applications with support for multiple protocols including TCP, UDP, and WebSocket.
wiremock/WireMock.Net
WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on WireMock Java, but extended and different functionality. Full documentation can be found at https://wiremock.org/dotnet/.
Version Downloads Last Updated
2.0.1 885 5/14/2026
2.0.0 2,980 5/6/2026
1.1.27 6,729 4/25/2026
1.1.26 13,417 3/29/2026
1.1.25 10,895 3/15/2026
1.1.24 15,537 2/22/2026
1.1.23 26,314 1/25/2026
1.1.22 3,050 1/18/2026
1.1.21 6,832 12/28/2025
1.1.20 6,248 12/14/2025
1.1.19 3,925 11/30/2025
1.1.18 11,503 11/16/2025
1.1.17 6,809 11/9/2025
1.1.16 10,620 10/19/2025
1.1.15 5,725 10/5/2025
1.1.14 14,420 9/16/2025
1.1.13 3,997 9/3/2025
1.1.12 20,772 8/17/2025
1.1.11 14,074 8/10/2025
1.1.10 3,508 8/3/2025
Loading failed