Table of Contents

Class LoggerHelperExtensions

Namespace
Bunit.Extensions
Assembly
Bunit.Core.dll

Helper extension methods for getting a logger.

public static class LoggerHelperExtensions
Inheritance
LoggerHelperExtensions
Inherited Members

Methods

CreateLogger<TCategoryName>(IServiceProvider)

Creates a logger from the ILoggerFactory registered in the IServiceProvider.

public static ILogger<TCategoryName> CreateLogger<TCategoryName>(this IServiceProvider services)

Parameters

services IServiceProvider

The service to get the ILoggerFactory from.

Returns

ILogger<TCategoryName>

The ILogger<TCategoryName>.

Type Parameters

TCategoryName

The category for the logger.

.NET Foundation

Supported by the .NET Foundation.