NullLogger Class

Namespace
Microsoft.Extensions.Logging.Testing
Assemblies
  • Microsoft.Extensions.Logging.Testing

Syntax

public class NullLogger : ILogger
class Microsoft.Extensions.Logging.Testing.NullLogger

Methods

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

Fields

Instance()
Return type:Microsoft.Extensions.Logging.Testing.NullLogger
public static readonly NullLogger Instance