Partilhar via


EnrichmentServiceCollectionExtensions.AddLogEnricher Método

Definição

Sobrecargas

AddLogEnricher(IServiceCollection, ILogEnricher)

Registra uma instância do enriquecidor de logs.

AddLogEnricher<T>(IServiceCollection)

Registra um tipo de enriquecidor de log.

AddLogEnricher(IServiceCollection, ILogEnricher)

Origem:
EnrichmentServiceCollectionExtensions.cs
Origem:
EnrichmentServiceCollectionExtensions.cs

Registra uma instância do enriquecidor de logs.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Diagnostics::Enrichment::ILogEnricher ^ enricher);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Diagnostics.Enrichment.ILogEnricher enricher);
static member AddLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Diagnostics.Enrichment.ILogEnricher -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddLogEnricher (services As IServiceCollection, enricher As ILogEnricher) As IServiceCollection

Parâmetros

services
IServiceCollection

O contêiner de injeção de dependência ao qual adicionar a instância do enriquecidor.

enricher
ILogEnricher

A instância do enriquecidor a ser adicionada.

Retornos

O valor de services.

Exceções

services ou enricher é null.

Aplica-se a

AddLogEnricher<T>(IServiceCollection)

Origem:
EnrichmentServiceCollectionExtensions.cs
Origem:
EnrichmentServiceCollectionExtensions.cs

Registra um tipo de enriquecidor de log.

public:
generic <typename T>
 where T : class, Microsoft::Extensions::Diagnostics::Enrichment::ILogEnricher[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLogEnricher<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Microsoft.Extensions.Diagnostics.Enrichment.ILogEnricher;
static member AddLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Microsoft.Extensions.Diagnostics.Enrichment.ILogEnricher)
<Extension()>
Public Function AddLogEnricher(Of T As {Class, ILogEnricher}) (services As IServiceCollection) As IServiceCollection

Parâmetros de tipo

T

Tipo de enriquecidor.

Parâmetros

services
IServiceCollection

O contêiner de injeção de dependência ao qual adicionar o tipo de enriquecidor.

Retornos

O valor de services.

Exceções

services é null.

Aplica-se a