VOOZH about

URL: https://www.nuget.org/packages/MartinCostello.Logging.XUnit/

⇱ NuGet Gallery | MartinCostello.Logging.XUnit 0.7.1




👁 Image
MartinCostello.Logging.XUnit 0.7.1

dotnet add package MartinCostello.Logging.XUnit --version 0.7.1
 
 
NuGet\Install-Package MartinCostello.Logging.XUnit -Version 0.7.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="MartinCostello.Logging.XUnit" Version="0.7.1" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.7.1" />
 
Directory.Packages.props
<PackageReference Include="MartinCostello.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 MartinCostello.Logging.XUnit --version 0.7.1
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MartinCostello.Logging.XUnit, 0.7.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 MartinCostello.Logging.XUnit@0.7.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=MartinCostello.Logging.XUnit&version=0.7.1
 
Install as a Cake Addin
#tool nuget:?package=MartinCostello.Logging.XUnit&version=0.7.1
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

xunit Logging

Introduction

MartinCostello.Logging.XUnit and MartinCostello.Logging.XUnit.v3 provide extensions to hook into the ILogger infrastructure to output logs from your xunit tests to the test output.

Usage

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Xunit;
using Xunit.Abstractions; // For xunit v2 - not required for xunit v3

namespace MyApp.Calculator;

public class CalculatorTests(ITestOutputHelper outputHelper)
{
 [Fact]
 public void Calculator_Sums_Two_Integers()
 {
 // Arrange
 using var serviceProvider = new ServiceCollection()
 .AddLogging((builder) => builder.AddXUnit(outputHelper))
 .AddSingleton<Calculator>()
 .BuildServiceProvider();

 var calculator = services.GetRequiredService<Calculator>();

 // Act
 int actual = calculator.Sum(1, 2);

 // Assert
 Assert.AreEqual(3, actual);
 }
}

public sealed class Calculator(ILogger<Calculator> logger)
{
 public int Sum(int x, int y)
 {
 int sum = x + y;

 logger.LogInformation("The sum of {x} and {y} is {sum}.", x, y, sum);

 return sum;
 }
}

Feedback

Any feedback or issues can be added to the issues for this project in GitHub.

License

This project is licensed under the Apache 2.0 license.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (13)

Showing the top 5 NuGet packages that depend on MartinCostello.Logging.XUnit:

Package Downloads
Sekiban.Testing

Sekiban - Event Sourcing Framework Testing

SPG.Framework.IntegrationTest

Package Description

AElf.ContractTestKit

Contract testing kit.

AElf.ContractTestBase

Contract test base.

AElf.Contracts.TestKit

Contract testing kit.

GitHub repositories (30)

Showing the top 20 popular GitHub repositories that depend on MartinCostello.Logging.XUnit:

Repository Stars
bitwarden/server
Bitwarden infrastructure/backend (API, database, Docker, etc).
openiddict/openiddict-core
Flexible and versatile OAuth 2.0/OpenID Connect stack for .NET
aspnet-contrib/AspNet.Security.OAuth.Providers
OAuth 2.0 social authentication providers for ASP.NET Core
CarterCommunity/Carter
Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and most importantly more enjoyable.
AElfProject/AElf
An AI-enhanced cloud-native layer-1 blockchain network. 
kubernetes-client/csharp
Officially supported dotnet Kubernetes Client library
microsoft/aspire-samples
Browse the sample apps demonstrating Aspire integration across C#, JavaScript, TypeScript, Python, Go, containers, databases, cloud, AI, and observability scenarios.
Libitum/jellyfin-plugin-douban
Douban metadata provider for Jellyfin
weikio/PluginFramework
Everything is a Plugin in .NET
xBimTeam/XbimEssentials
A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
temporalio/sdk-dotnet
Temporal .NET SDK
ObsidianMC/Obsidian
A C# implementation of the Minecraft server protocol.
FritzAndFriends/BlazorWebFormsComponents
A collection of Blazor components that emulate the ASP.NET Web Forms controls of the same name
mehdihadeli/food-delivery-modular-monolith
🌭 A practical and imaginary food and grocery delivery modular monolith, built with .Net 8, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
IEvangelist/azure-cosmos-dotnet-repository
Wraps the .NET SDK for Azure Cosmos DB abstracting away the complexity, exposing a simple CRUD-based repository pattern
grate-devs/grate
grate - the SQL scripts migration runner
BEagle1984/silverback
Silverback is a message bus and broker integration library for .NET. It is designed to simplify event-driven architectures and asynchronous messaging, with first-class support for Apache Kafka and MQTT.
Overmiind/Puppeteer-sharp-extra
Plugin framework for PuppeteerSharp
sbroenne/mcp-server-excel
Excel MCP Server & CLI - 23 tools, 214 operations for AI-powered Excel automation via COM API
caryyu/jellyfin-plugin-opendouban
Douban metadata provider for Jellyfin
Version Downloads Last Updated
0.7.1 213,995 3/2/2026
0.7.0 319,266 11/11/2025
0.6.0 731,963 5/21/2025
0.5.1 864,262 12/26/2024
0.5.0 37,068 12/20/2024
0.4.0 2,454,450 6/1/2024
0.3.0 5,378,389 5/22/2022
0.2.1 27,799 5/15/2022
0.2.0 808,624 10/3/2021
0.1.2 263,486 7/12/2021
0.1.1 315,272 3/26/2021
0.1.0 1,251,266 9/30/2018
0.1.0-beta1 1,092 9/26/2018
0.1.0-alpha4 3,003 8/20/2018
0.1.0-alpha3 1,057 8/19/2018
0.1.0-alpha2 1,039 8/19/2018
0.1.0-alpha1 1,029 8/19/2018