Table of Contents

Class LoggingServiceCollectionExtensions

Namespace
CMS.EventLog
Assembly
CMS.EventLog.dll

Extension methods for configuring Xperience logging services.

public static class LoggingServiceCollectionExtensions
Inheritance
object
LoggingServiceCollectionExtensions

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

services IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add the services to.

configure Action<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.