Share via


SPDiagnosticsCategory constructor (String, String, TraceSeverity, EventSeverity, UInt32, UInt32, Boolean, Boolean)

Initializes the category name and the default throttle value for TraceSeverity and EventSeverity with the specified name, localized name, TraceSeverity object, EventSeverity object, message identifier, category identifier, unique numeric identifier, a Bool that specifies whether the created object is hidden from logging, and a Bool that specifies whether the defined category is synchronized with other categories.

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

Syntax

'Declaration
Public Sub New ( _
    name As String, _
    localizedName As String, _
    traceDefault As TraceSeverity, _
    eventDefault As EventSeverity, _
    messageId As UInteger, _
    categoryId As UInteger, _
    hidden As Boolean, _
    shadow As Boolean _
)
'Usage
Dim name As String
Dim localizedName As String
Dim traceDefault As TraceSeverity
Dim eventDefault As EventSeverity
Dim messageId As UInteger
Dim categoryId As UInteger
Dim hidden As Boolean
Dim shadow As Boolean

Dim instance As New SPDiagnosticsCategory(name, localizedName, _
    traceDefault, eventDefault, messageId, _
    categoryId, hidden, shadow)
public SPDiagnosticsCategory(
    string name,
    string localizedName,
    TraceSeverity traceDefault,
    EventSeverity eventDefault,
    uint messageId,
    uint categoryId,
    bool hidden,
    bool shadow
)

Parameters

  • localizedName
    Type: System.String

    The localized name of the category or a null reference (Nothing in Visual Basic). If the value is a null reference (Nothing in Visual Basic), the SPDiagnosticsServiceBase will attempt to find the localized name from the resource DLL specified in the SPDiagnosticsServiceBase using the messageId as the message index in the resource DLL.

  • messageId
    Type: System.UInt32

    The index in the message table associated with the localized name. This parameter is used if the localizedName parameter is a null reference (Nothing in Visual Basic) and if the SPDiagnosticsServiceBase contains a resource DLL.

  • categoryId
    Type: System.UInt32

    The unique numeric ID representing the category.

  • hidden
    Type: System.Boolean

    true to hide the SPDiagnosticsArea object from the Configure Diagnostic Logging page of the Central Administration site; otherwise, false.

  • shadow
    Type: System.Boolean

    true to automatically synchronize this category with other categories defined in the farm using the same name.

See also

Reference

SPDiagnosticsCategory class

SPDiagnosticsCategory members

SPDiagnosticsCategory overload

Microsoft.SharePoint.Administration namespace