Table of Contents

Class LoggerFactoryExtensions

Namespace
Microsoft.Extensions.Logging
Assembly
Microsoft.Extensions.Logging.Abstractions.dll

ILoggerFactory extension methods for common scenarios.

public static class LoggerFactoryExtensions
Inheritance
LoggerFactoryExtensions
Inherited Members

Methods

CreateLogger(ILoggerFactory, Type)

Creates a new ILogger instance using the full name of the given type.

public static ILogger CreateLogger(this ILoggerFactory factory, Type type)

Parameters

factory ILoggerFactory

The factory.

type Type

The type.

Returns

ILogger

CreateLogger<T>(ILoggerFactory)

Creates a new ILogger instance using the full name of the given type.

public static ILogger<T> CreateLogger<T>(this ILoggerFactory factory)

Parameters

factory ILoggerFactory

The factory.

Returns

ILogger<T>

Type Parameters

T

The type.