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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the allowlist headers that should be logged.Gets the allowlist query parameters.com.azure.core.http.policy.HttpLogDetailLevelgetLevel()Gets the level of detail to log on HTTP messages.Gets flag to allow pretty printing of message bodies.voidsetLevel(com.azure.core.http.policy.HttpLogDetailLevel level) Set the logging detail level.voidsetPrettyPrintBody(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.HttpLoggingOptionsGets the level of detail to log on HTTP messages.- Specified by:
getLevelin 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.HttpLoggingOptionsGets the allowlist headers that should be logged.- Specified by:
getAllowedHeaderNamesin interfaceHttpLoggingOptionsProvider.HttpLoggingOptions- Returns:
- The list of allowlist headers.
-
getAllowedQueryParamNames
Description copied from interface:HttpLoggingOptionsProvider.HttpLoggingOptionsGets the allowlist query parameters.- Specified by:
getAllowedQueryParamNamesin interfaceHttpLoggingOptionsProvider.HttpLoggingOptions- Returns:
- The list of allowlist query parameters.
-
getPrettyPrintBody
Description copied from interface:HttpLoggingOptionsProvider.HttpLoggingOptionsGets flag to allow pretty printing of message bodies.- Specified by:
getPrettyPrintBodyin interfaceHttpLoggingOptionsProvider.HttpLoggingOptions- Returns:
- whether to pretty print the message bodies.
-
setPrettyPrintBody
Set whether to pretty print body.- Parameters:
prettyPrintBody- Whether to pretty print body.
-