Click or drag to resize
LogContextLogEvent Method
Writes a new record to the event log.

Namespace: CMS.EventLog
Assembly: CMS.EventLog (in CMS.EventLog.dll) Version: 8.2.23
Syntax
C#
public static void LogEvent(
	string eventType,
	string source,
	string eventCode,
	string eventDescription,
	string eventUrl,
	int userId,
	string userName,
	int nodeId,
	string documentName,
	string ipAddress,
	int siteId,
	string machineName,
	string urlReferrer,
	string userAgent,
	DateTime eventTime
)

Parameters

eventType
Type: SystemString
Type of the event. Please use predefined constants from EventLogProvider
source
Type: SystemString
Source of the event (Content, Administration, etc.)
eventCode
Type: SystemString
Event code (Security, Update, Delete, etc.)
eventDescription
Type: SystemString
Detailed description of the event
eventUrl
Type: SystemString
Event URL address
userId
Type: SystemInt32
ID of the user, who caused logged event
userName
Type: SystemString
Name of the user, who caused logged event
nodeId
Type: SystemInt32
ID value of the document
documentName
Type: SystemString
NamePath value of the document
ipAddress
Type: SystemString
IP Address of the user, who caused logged event
siteId
Type: SystemInt32
ID of the site
machineName
Type: SystemString
Name of machine
urlReferrer
Type: SystemString
Referrer URL
userAgent
Type: SystemString
User agent
eventTime
Type: SystemDateTime
Date and time when the event occurs
See Also