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
ILoggerProviderThe ILoggerProvider.
CreateLogger(string)
Creates a new ILogger instance.
ILogger CreateLogger(string categoryName)
Parameters
categoryName
stringThe category name for messages produced by the logger.