Skip to main content
Version: v0.1.0

Logging

xUnit Test Logging

The Arcus.Testing.Logging library provides a XunitTestLogger type that's an implementation of the abstracted Microsoft Ilogger inside the xUnit test framework.

Log messages written to the ILogger instance will be written to the xUnit test output.

using Arcus.Testing.Logging;
using Microsoft.Extensions.Logging;
using Xunit.Abstractions;

public class TestClass
{
private readonly ILogger _testLogger;

public TestClass(ITestOutputHelper outputWriter)
{
_testLogger = new XunitTestLogger(outputWriter);
}
}