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
)
参数
id
类型:System.UInt16该 id。
category
类型:Microsoft.SharePoint.Administration.SPDiagnosticsCategory该类别中。
severity
类型:Microsoft.SharePoint.Administration.EventSeverity严重级别。
output
类型:System.String该消息。(可选),该消息可能包含格式占位符以便进行格式设置,可以将字符串传递给System.String.Format(string, Object[]) 。
data
类型:[]将替换为message格式字符串可选项目。