LoggerFactory Class

Definition

Produces instances of ILogger classes based on the given providers.

public class LoggerFactory : IDisposable, Microsoft.Extensions.Logging.ILoggerFactory
Inheritance
LoggerFactory
Implements

Constructors

Methods

AddProvider(ILoggerProvider)

Adds the given provider to those used in creating ILogger instances.

CheckDisposed()

Check if the factory has been disposed.

Create(Action<ILoggingBuilder>)

Creates new instance of ILoggerFactory configured using provided configure delegate.

CreateLogger(String)

Creates an ILogger with the given categoryName.

Dispose()

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

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

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

Prodotto Versioni
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)