IDiagnosticsDataservice.GetULSLog method
Get the ULS log entries for a particular correlation id
Namespace: Microsoft.SharePoint.Diagnostics
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
<WebGetAttribute(UriTemplate := "{CorrelationId}/ULS?startTimeUtc={startTimeUtc}&maxEntries={maxEntries}&forwardScanMinutes={forwardScanMinutes}", _
RequestFormat := WebMessageFormat.Json, ResponseFormat := WebMessageFormat.Json)> _
<OperationContractAttribute> _
Function GetULSLog ( _
correlationId As String, _
startTimeUtc As DateTime, _
maxEntries As Integer, _
forwardScanMinutes As Integer _
) As ULSLogEntry()
'Usage
Dim instance As IDiagnosticsDataservice
Dim correlationId As String
Dim startTimeUtc As DateTime
Dim maxEntries As Integer
Dim forwardScanMinutes As Integer
Dim returnValue As ULSLogEntry()
returnValue = instance.GetULSLog(correlationId, _
startTimeUtc, maxEntries, forwardScanMinutes)
[WebGetAttribute(UriTemplate = "{CorrelationId}/ULS?startTimeUtc={startTimeUtc}&maxEntries={maxEntries}&forwardScanMinutes={forwardScanMinutes}",
RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
[OperationContractAttribute]
ULSLogEntry[] GetULSLog(
string correlationId,
DateTime startTimeUtc,
int maxEntries,
int forwardScanMinutes
)
Parameters
correlationId
Type: System.StringThe correlation id
startTimeUtc
Type: System.DateTimeThe start time. If not specified, the start time will be either when the correlation id first appears.
maxEntries
Type: System.Int32The maximum returned log entries. If not specificed, default is 1000
forwardScanMinutes
Type: System.Int32The minutes that scan in the log file. If not specified, default is 5 minutes
Return value
Type: []
A list of log entries
Remarks
If the correlation id is not generated by server, the caller needs to set the start time correctly since the server cannot figure out when the correlation id starts in this case.
See also
Reference
IDiagnosticsDataservice interface