SPDiagnosticsServiceBase.WriteEvent 方法

将事件写入到 Windows 应用程序事件日志中,如果的事件严重度为SPDiagnosticsCategory所配置的阈值以上)。

命名空间:  Microsoft.SharePoint.Administration
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Sub WriteEvent ( _
    id As UShort, _
    category As SPDiagnosticsCategory, _
    severity As EventSeverity, _
    output As String, _
    ParamArray data As Object() _
)
用法
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
)

参数

  • output
    类型:System.String

    该消息。(可选),该消息可能包含格式占位符以便进行格式设置,可以将字符串传递给System.String.Format(string, Object[]) 。

  • data
    类型:[]

    将替换为message格式字符串可选项目。

另请参阅

引用

SPDiagnosticsServiceBase 类

SPDiagnosticsServiceBase 成员

Microsoft.SharePoint.Administration 命名空间