Share via


SPLog.GetInstance method (Type, MethodInfo)

Returns an instance of the log object that belongs to the specified type based on the specified method information.

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

Syntax

'Declaration
Public Shared Function GetInstance ( _
    type As Type, _
    method As MethodInfo _
) As SPLog
'Usage
Dim type As Type
Dim method As MethodInfo
Dim returnValue As SPLog

returnValue = SPLog.GetInstance(type, _
    method)
public static SPLog GetInstance(
    Type type,
    MethodInfo method
)

Parameters

  • type
    Type: System.Type

    A System.Type object that represents the type.

Return value

Type: Microsoft.SharePoint.Upgrade.SPLog
An SPLog object that represents the log.

Remarks

The GetInstance method implements the format full_name_of_type::name_of_method as the category.

This method returns a System.ArgumentNullException exception if either parameter contains a null reference (Nothing in Visual Basic).

See also

Reference

SPLog class

SPLog members

GetInstance overload

Microsoft.SharePoint.Upgrade namespace