次の方法で共有


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)

Syntax

'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)
public void WriteEvent(
    ushort id,
    SPDiagnosticsCategory category,
    EventSeverity severity,
    string output,
    params Object[] data
)

Parameters

  • 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.

See also

Reference

SPDiagnosticsServiceBase class

SPDiagnosticsServiceBase members

Microsoft.SharePoint.Administration namespace