Logger<T> Class

Delegates to a new Microsoft.Extensions.Logging.ILogger instance using the full name of the given type, created by the provided Microsoft.Extensions.Logging.ILoggerFactory.

Namespace
Microsoft.Extensions.Logging
Assemblies
  • Microsoft.Extensions.Logging.Abstractions

Syntax

public class Logger<T> : ILogger<T>, ILogger
class Microsoft.Extensions.Logging.Logger<T>

Constructors

Logger(Microsoft.Extensions.Logging.ILoggerFactory)

Creates a new Microsoft.Extensions.Logging.Logger`1.

Arguments:factory (Microsoft.Extensions.Logging.ILoggerFactory) – The factory.
public Logger(ILoggerFactory factory)

Methods

BeginScope<TState>(TState)
Return type:System.IDisposable
IDisposable ILogger.BeginScope<TState>(TState state)
IsEnabled(Microsoft.Extensions.Logging.LogLevel)
Return type:System.Boolean
bool ILogger.IsEnabled(LogLevel logLevel)
Log<TState>(Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.EventId, TState, System.Exception, System.Func<TState, System.Exception, System.String>)
void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)