Microsoft.Extensions.Logging Namespace

Contains classes and abstractions for configuring ILogger.

Classes

AzureAppServicesLoggerFactoryExtensions

Extension methods for adding Azure diagnostics logger.

ConsoleLoggerExtensions

Provides extension methods for the ILoggingBuilder and ILoggerProviderConfiguration<T> classes.

DebugLoggerFactoryExtensions

Extension methods for the ILoggerFactory class.

EventLoggerFactoryExtensions

Extension methods for the ILoggerFactory class.

EventSourceLoggerFactoryExtensions

Extension methods for the ILoggerFactory class.

FakeLoggerBuilderExtensions

Extensions for configuring fake logging, used in unit tests.

FilterLoggerFactoryExtensions

ILoggerFactory extension methods which provide a common way to filter log messages across all registered ILoggerProviders.

FilterLoggerSettings

Filter settings for messages logged by an ILogger.

FilterLoggingBuilderExtensions

Extension methods for setting up logging services in an IServiceCollection.

LogDefineOptions

Specifies options for Define(LogLevel, EventId, String) and its overloads.

Logger<T>

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

LoggerEnrichmentOptions

Options for logging enrichment features.

LoggerExtensions

ILogger extension methods for common scenarios.

LoggerExternalScopeProvider

Default implementation of IExternalScopeProvider.

LoggerFactory

Produces instances of ILogger classes based on the specified providers.

LoggerFactoryExtensions

ILoggerFactory extension methods for common scenarios.

LoggerFactoryOptions

Defines the options for a logger factory.

LoggerFilterOptions

The options for a LoggerFilter.

LoggerFilterRule

Defines a rule used to filter log messages.

LoggerMessage

Creates delegates which can be later cached to log messages in a performant way.

LoggerMessageAttribute

Provides information to guide the production of a strongly-typed logging method.

LoggerRedactionOptions

Options to control redaction.

LoggingBuilderExtensions

Provides extension methods for setting up logging services in an ILoggingBuilder.

LoggingEnrichmentExtensions

Extensions for configuring logging enrichment features.

LoggingRedactionExtensions

Extensions for configuring logging redaction features.

LogPropertiesAttribute

Marks a logging method parameter whose public properties need to be logged as log tags.

LogPropertyIgnoreAttribute

Indicates that a tag should not be logged.

ProviderAliasAttribute

Defines alias for ILoggerProvider implementation to be used in filtering rules.

TagNameAttribute

Defines the tag name to use for a logged parameter or property.

TagProviderAttribute

Defines a method to invoke to generate logging tags for a referenced object.

TraceSourceFactoryExtensions

Extension methods for setting up TraceSourceLoggerProvider on a ILoggingBuilder.

Structs

EventId

Identifies a logging event. The primary identifier is the "Id" property, with the "Name" property providing a short description of this type of event.

Interfaces

IExternalScopeProvider

Represents a storage of common scope data.

IFilterLoggerSettings

Filter settings for messages logged by an ILogger.

ILogger

Represents a type used to perform logging.

ILogger<TCategoryName>

A generic interface for logging where the category name is derived from the specified TCategoryName type name. Generally used to enable activation of a named ILogger from dependency injection.

ILoggerFactory

Represents a type used to configure the logging system and create instances of ILogger from the registered ILoggerProviders.

ILoggerProvider

Represents a type that can create instances of ILogger.

ILoggingBuilder

An interface for configuring logging providers.

ISupportExternalScope

Represents a ILoggerProvider that is able to consume external scope information.

ITagCollector

Represents a custom tag provider and enables it to emit tags.

Enums

ActivityTrackingOptions

Defines the flags to indicate which trace context parts should be included with the logging scopes.

LogLevel

Defines logging severity levels.