FakeLogger<T> Constructors

Definition

Overloads

FakeLogger<T>(FakeLogCollector)

Initializes a new instance of the FakeLogger<T> class.

FakeLogger<T>(Action<String>)

Initializes a new instance of the FakeLogger<T> class that copies all log records to the given output sink.

FakeLogger<T>(FakeLogCollector)

Source:
FakeLoggerT.cs

Initializes a new instance of the FakeLogger<T> class.

public FakeLogger (Microsoft.Extensions.Logging.Testing.FakeLogCollector? collector = default);

Parameters

collector
FakeLogCollector

Where to push all log state.

Applies to

.NET 9 (package-provided) und andere Versionen
Produkt Versionen
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)

FakeLogger<T>(Action<String>)

Source:
FakeLoggerT.cs

Initializes a new instance of the FakeLogger<T> class that copies all log records to the given output sink.

public FakeLogger (Action<string> outputSink);

Parameters

outputSink
Action<String>

Where to emit individual log records.

Applies to

.NET 9 (package-provided) und andere Versionen
Produkt Versionen
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)