Table of Contents

Interface ILoggerFactory

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

Represents a type used to configure the logging system and create instances of ILogger from the registered ILoggerProviders.

public interface ILoggerFactory : IDisposable
Inherited Members
Extension Methods

Methods

AddProvider(ILoggerProvider)

Adds an ILoggerProvider to the logging system.

void AddProvider(ILoggerProvider provider)

Parameters

provider ILoggerProvider

The ILoggerProvider.

CreateLogger(string)

Creates a new ILogger instance.

ILogger CreateLogger(string categoryName)

Parameters

categoryName string

The category name for messages produced by the logger.

Returns

ILogger

The ILogger.