ApplicationEnricherServiceCollectionExtensions.AddServiceLogEnricher Método
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
AddServiceLogEnricher(IServiceCollection) |
Agrega una instancia del enriquecidor de servicio a IServiceCollection. |
AddServiceLogEnricher(IServiceCollection, IConfigurationSection) |
Agrega una instancia del enriquecidor de servicio a IServiceCollection. |
AddServiceLogEnricher(IServiceCollection, Action<ApplicationLogEnricherOptions>) |
Agrega una instancia del enriquecidor de servicio a IServiceCollection. |
Agrega una instancia del enriquecidor de servicio a IServiceCollection.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddServiceLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddServiceLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddServiceLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddServiceLogEnricher (services As IServiceCollection) As IServiceCollection
Parámetros
- services
- IServiceCollection
IServiceCollection al que se va a agregar el enriquecidor del servicio.
Devoluciones
El valor de services
.
Excepciones
services
es null
.
Se aplica a
.NET 9 (package-provided) otras versiones
Producto | Versiones |
---|---|
.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) |
Agrega una instancia del enriquecidor de servicio a IServiceCollection.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddServiceLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddServiceLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddServiceLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddServiceLogEnricher (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
Parámetros
- services
- IServiceCollection
IServiceCollection al que se va a agregar el enriquecidor del servicio.
- section
- IConfigurationSection
IConfigurationSection que se va a usar para configurar ApplicationLogEnricherOptions en el enriquecidor de servicios.
Devoluciones
El valor de services
.
Excepciones
Cualquiera de los argumentos es null
.
Se aplica a
.NET 9 (package-provided) otras versiones
Producto | Versiones |
---|---|
.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) |
Agrega una instancia del enriquecidor de servicio a IServiceCollection.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddServiceLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Diagnostics::Enrichment::ApplicationLogEnricherOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddServiceLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.Enrichment.ApplicationLogEnricherOptions> configure);
static member AddServiceLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Diagnostics.Enrichment.ApplicationLogEnricherOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddServiceLogEnricher (services As IServiceCollection, configure As Action(Of ApplicationLogEnricherOptions)) As IServiceCollection
Parámetros
- services
- IServiceCollection
IServiceCollection al que se va a agregar el enriquecidor del servicio.
- configure
- Action<ApplicationLogEnricherOptions>
El delegado de configuración de ApplicationLogEnricherOptions.
Devoluciones
El valor de services
.
Excepciones
Cualquiera de los argumentos es null
.
Se aplica a
.NET 9 (package-provided) otras versiones
Producto | Versiones |
---|---|
.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) |
Comentarios de .NET
.NET es un proyecto de código abierto. Selecciona un vínculo para proporcionar comentarios: