NullLoggerFactory Class

Definition

An ILoggerFactory used to create an instance of NullLogger that logs nothing.

C#
public class NullLoggerFactory : IDisposable, Microsoft.Extensions.Logging.ILoggerFactory
Inheritance
NullLoggerFactory
Implements

Constructors

NullLoggerFactory()

Creates a new NullLoggerFactory instance.

Fields

Instance

Returns the shared instance of NullLoggerFactory.

Methods

AddProvider(ILoggerProvider)

Adds an ILoggerProvider to the logging system.

CreateLogger(String)

Creates a new ILogger instance.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Extension Methods

CreateLogger(ILoggerFactory, Type)

Creates a new ILogger instance using the full name of the given type.

CreateLogger<T>(ILoggerFactory)

Creates a new ILogger instance using the full name of the given type.

Applies to

Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)