Class EventLogService
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
-
objectEventLogService
- 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
writersIEnumerable<IEventLogWriter>
EventLogService(IEnumerable<IEventLogWriter>, IServiceProvider)
Initializes a new instance of the EventLogService class.
public EventLogService(IEnumerable<IEventLogWriter> writers, IServiceProvider serviceProvider)
Parameters
writersIEnumerable<IEventLogWriter>serviceProviderIServiceProvider
Methods
EnsureContextInformation(EventLogData)
Fills the EventLogData with contextual information about the current request and machine.
protected void EnsureContextInformation(EventLogData eventLogData)
Parameters
eventLogDataEventLogDataEvent 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
eventLogDataEventLogDataThe event data to log.
Exceptions
- ArgumentNullException
Thrown when
eventLogDatais null.