Table of Contents

Class EventLogService

Namespace
CMS.EventLog
Assembly
CMS.EventLog.dll

Service logs events via registered implementations of IEventLogWriter and ensures the contextual information in the logged data.

[Obsolete("The class was not intended for public use and will be removed in the next version. For customizations of the event log, use the CMS.Core.IEventLogService interface.")]
public class EventLogService : IEventLogService
Inheritance
object
EventLogService
Implements
Extension Methods

Constructors

EventLogService()

Initializes a new instance of the EventLogService class.

protected EventLogService()

EventLogService(IEnumerable<IEventLogWriter>)

Initializes a new instance of the EventLogService class.

public EventLogService(IEnumerable<IEventLogWriter> writers)

Parameters

writers IEnumerable<IEventLogWriter>

EventLogService(IEnumerable<IEventLogWriter>, IServiceProvider)

Initializes a new instance of the EventLogService class.

public EventLogService(IEnumerable<IEventLogWriter> writers, IServiceProvider serviceProvider)

Parameters

writers IEnumerable<IEventLogWriter>
serviceProvider IServiceProvider

Methods

EnsureContextInformation(EventLogData)

Fills the EventLogData with contextual information about the current request and machine.

protected void EnsureContextInformation(EventLogData eventLogData)

Parameters

eventLogData EventLogData

Event log data to be filled with contextual information.

Remarks

The contextual data is filled only when they are null.

LogEvent(EventLogData)

Logs an event using the configured logging policy.

public virtual void LogEvent(EventLogData eventLogData)

Parameters

eventLogData EventLogData

The event data to log.

Exceptions

ArgumentNullException

Thrown when eventLogData is null.