SPDiagnosticsServiceBase.WriteEvent method

Writes an event to the Windows application event log, if the event severity is above the configured threshold for the SPDiagnosticsCategory.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

'Declaration
Public Sub WriteEvent ( _
	id As UShort, _
	category As SPDiagnosticsCategory, _
	severity As EventSeverity, _
	output As String, _
	ParamArray data As Object() _
)
'Usage
Dim instance As SPDiagnosticsServiceBase
Dim id As UShort
Dim category As SPDiagnosticsCategory
Dim severity As EventSeverity
Dim output As String
Dim data As Object()

instance.WriteEvent(id, category, severity, _
	output, data)

Parameters

id
Type: System.UInt16

The ID.

category
Type: Microsoft.SharePoint.Administration.SPDiagnosticsCategory

The category.

severity
Type: Microsoft.SharePoint.Administration.EventSeverity

The severity.

output
Type: System.String

The message. Optionally, the message may contain format placeholders so that the string can be passed to System.String.Format(string, Object[]) for formatting.

data
Type: []

The optional items to be replaced into the message format string.

Show: