Class HttpLoggingProperties
java.lang.Object
com.azure.spring.cloud.core.properties.client.HttpLoggingProperties
- All Implemented Interfaces:
HttpLoggingOptionsProvider.HttpLoggingOptions
public final class HttpLoggingProperties
extends Object
implements HttpLoggingOptionsProvider.HttpLoggingOptions
Options related to http logging. For example, if you want to log the http request or response, you could set the
level to
HttpLogDetailLevel.BASIC
or some other levels.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the allowlist headers that should be logged.Gets the allowlist query parameters.com.azure.core.http.policy.HttpLogDetailLevel
getLevel()
Gets the level of detail to log on HTTP messages.Gets flag to allow pretty printing of message bodies.void
setLevel
(com.azure.core.http.policy.HttpLogDetailLevel level) Set the logging detail level.void
setPrettyPrintBody
(Boolean prettyPrintBody) Set whether to pretty print body.
-
Constructor Details
-
HttpLoggingProperties
public HttpLoggingProperties()Creates an instance ofHttpLoggingProperties
.
-
-
Method Details
-
getLevel
public com.azure.core.http.policy.HttpLogDetailLevel getLevel()Description copied from interface:HttpLoggingOptionsProvider.HttpLoggingOptions
Gets the level of detail to log on HTTP messages.- Specified by:
getLevel
in interfaceHttpLoggingOptionsProvider.HttpLoggingOptions
- Returns:
- the http log detail level.
-
setLevel
public void setLevel(com.azure.core.http.policy.HttpLogDetailLevel level) Set the logging detail level.- Parameters:
level
- The logging detail level.
-
getAllowedHeaderNames
Description copied from interface:HttpLoggingOptionsProvider.HttpLoggingOptions
Gets the allowlist headers that should be logged.- Specified by:
getAllowedHeaderNames
in interfaceHttpLoggingOptionsProvider.HttpLoggingOptions
- Returns:
- The list of allowlist headers.
-
getAllowedQueryParamNames
Description copied from interface:HttpLoggingOptionsProvider.HttpLoggingOptions
Gets the allowlist query parameters.- Specified by:
getAllowedQueryParamNames
in interfaceHttpLoggingOptionsProvider.HttpLoggingOptions
- Returns:
- The list of allowlist query parameters.
-
getPrettyPrintBody
Description copied from interface:HttpLoggingOptionsProvider.HttpLoggingOptions
Gets flag to allow pretty printing of message bodies.- Specified by:
getPrettyPrintBody
in interfaceHttpLoggingOptionsProvider.HttpLoggingOptions
- Returns:
- whether to pretty print the message bodies.
-
setPrettyPrintBody
Set whether to pretty print body.- Parameters:
prettyPrintBody
- Whether to pretty print body.
-