Class GraphLoggerExtensions
The graph logger extensions for the communications client.
Inherited Members
Namespace: Microsoft.Graph.Communications.Client
Assembly: Microsoft.Graph.Communications.Client.dll
Syntax
public static class GraphLoggerExtensions
Methods
LogHttpRequest(IGraphLogger, HttpRequestMessage, HttpStatusCode, Object, Exception, String, String, Int32)
Logs the request message.
Declaration
public static TraceLevel LogHttpRequest(this IGraphLogger logger, HttpRequestMessage request, HttpStatusCode statusCode, object requestContent = null, Exception exception = null, string memberName = null, string filePath = null, int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
IGraphLogger | logger | The logger. |
HttpRequestMessage | request | The request. |
HttpStatusCode | statusCode | The status code. |
Object | requestContent | The request content. |
Exception | exception | The exception. |
String | memberName | The member name. |
String | filePath | The file path. |
Int32 | lineNumber | The line number. |
Returns
Type | Description |
---|---|
TraceLevel | The trace level of the logged request message. |
LogHttpResponse(IGraphLogger, TraceLevel, HttpRequestMessage, HttpResponseMessage, Int64, Object, String, String, Int32)
Logs the http response message.
Declaration
public static void LogHttpResponse(this IGraphLogger logger, TraceLevel level, HttpRequestMessage request, HttpResponseMessage response, long responseTime, object responseContent = null, string memberName = null, string filePath = null, int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
IGraphLogger | logger | The logger. |
TraceLevel | level | The log level. |
HttpRequestMessage | request | The request. |
HttpResponseMessage | response | The response. |
Int64 | responseTime | The response time in milliseconds. |
Object | responseContent | The response content. |
String | memberName | The member name. |
String | filePath | The file path. |
Int32 | lineNumber | The line number. |
ParseRequestId(IGraphLogger, HttpRequestMessage)
Parses the request identifier.
Declaration
public static Guid ParseRequestId(this IGraphLogger logger, HttpRequestMessage request)
Parameters
Type | Name | Description |
---|---|---|
IGraphLogger | logger | The logger. |
HttpRequestMessage | request | The request. |
Returns
Type | Description |
---|---|
Guid | The message id. |
ParseScenarioId(IGraphLogger, HttpRequestMessage)
Parses the scenario identifier.
Declaration
public static Guid ParseScenarioId(this IGraphLogger logger, HttpRequestMessage request)
Parameters
Type | Name | Description |
---|---|---|
IGraphLogger | logger | The logger. |
HttpRequestMessage | request | The request. |
Returns
Type | Description |
---|---|
Guid | The scenario id. |