Class LoggingServiceCollectionExtensions
Extension methods for configuring Xperience logging services.
public static class LoggingServiceCollectionExtensions
- Inheritance
-
objectLoggingServiceCollectionExtensions
Methods
AddXperienceLogging(IServiceCollection, Action<ILoggingBuilder>)
Adds Xperience event logging provider with default filtering to the service collection. The provider ensures that ILogger events are propagated to EventLog.
public static IServiceCollection AddXperienceLogging(this IServiceCollection services, Action<ILoggingBuilder> configure = null)
Parameters
servicesIServiceCollectionThe Microsoft.Extensions.DependencyInjection.IServiceCollection to add the services to.
configureAction<ILoggingBuilder>Allows additional configuration of the Microsoft.Extensions.Logging.ILoggingBuilder.
Returns
- IServiceCollection
The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.
Remarks
The default filtering ensures that the event log is not cluttered with information messages from .NET framework, while still capturing important information from Kentico components.