Package com.azure.core.http.policy
Class HttpLoggingPolicy
- java.lang.Object
-
- com.azure.core.http.policy.HttpLoggingPolicy
-
- All Implemented Interfaces:
HttpPipelinePolicy
public class HttpLoggingPolicy extends Object implements HttpPipelinePolicy
The pipeline policy that handles logging of HTTP requests and responses.
-
-
Field Summary
Fields Modifier and Type Field Description static String
RETRY_COUNT_CONTEXT
Key forContext
to pass request retry count metadata for logging.
-
Constructor Summary
Constructors Constructor Description HttpLoggingPolicy(HttpLogOptions httpLogOptions)
Creates an HttpLoggingPolicy with the given log configurations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<HttpResponse>
process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)
Processes provided request context and invokes the next policy.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.azure.core.http.policy.HttpPipelinePolicy
getPipelinePosition
-
-
-
-
Field Detail
-
RETRY_COUNT_CONTEXT
public static final String RETRY_COUNT_CONTEXT
Key forContext
to pass request retry count metadata for logging.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpLoggingPolicy
public HttpLoggingPolicy(HttpLogOptions httpLogOptions)
Creates an HttpLoggingPolicy with the given log configurations.- Parameters:
httpLogOptions
- The HTTP logging configuration options.
-
-
Method Detail
-
process
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)
Description copied from interface:HttpPipelinePolicy
Processes provided request context and invokes the next policy.- Specified by:
process
in interfaceHttpPipelinePolicy
- Parameters:
context
- The request context.next
- The next policy to invoke.- Returns:
- A publisher that initiates the request upon subscription and emits a response on completion.
-
-