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
ILoggerFactoryThe factory.
type
TypeThe type.
Returns
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
ILoggerFactoryThe factory.
Returns
- ILogger<T>
Type Parameters
T
The type.