Click or drag to resize
EventLogProviderLogException Method

Note: This API is now obsolete.

Writes a new error to the event log.

This method is obsolete and will be removed in future version. Use LogEvent(EventLogData) or LogException(IEventLogService, String, String, Exception, Int32, String, LoggingPolicy) instead.

Namespace: CMS.EventLog
Assembly: CMS.EventLog (in CMS.EventLog.dll) Version: 13.0.131
Syntax
C#
[ObsoleteAttribute("Use 'CMS.Core.Service.Resolve<CMS.Core.IEventLogService>().LogException(source, eventCode, ex, siteId, additionalMessage, loggingPolicy)' code instead.")]
public static void LogException(
	string source,
	string eventCode,
	Exception ex,
	int siteId = 0,
	string additionalMessage = null,
	LoggingPolicy loggingPolicy = null
)

Parameters

source
Type: SystemString
Source of the event (Content, Administration, etc.)
eventCode
Type: SystemString
Event code (UPDATEDOC, SENDEMAIL, DELETE, etc.)
ex
Type: SystemException
Exception to be logged
siteId (Optional)
Type: SystemInt32
Current site ID
additionalMessage (Optional)
Type: SystemString
Additional information to the exception message
loggingPolicy (Optional)
Type: CMS.CoreLoggingPolicy
Logging policy.
See Also