Package com.azure.core.http.policy
Enum HttpLogDetailLevel
- All Implemented Interfaces:
Serializable
,Comparable<HttpLogDetailLevel>
,java.lang.constant.Constable
The level of detail to log on HTTP messages.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionLogs only URLs, HTTP methods, and time to finish the request.Logs everything in BASIC, plus all the request and response body.Logs everything in HEADERS and BODY.Logs everything in BASIC, plus all the request and response headers.Logging is turned off. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether a body should be logged.boolean
Whether headers should be logged.boolean
Whether a URL should be logged.static HttpLogDetailLevel
Returns the enum constant of this type with the specified name.static HttpLogDetailLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
Logging is turned off. -
BASIC
Logs only URLs, HTTP methods, and time to finish the request. -
HEADERS
Logs everything in BASIC, plus all the request and response headers. -
BODY
Logs everything in BASIC, plus all the request and response body. Note that only payloads in plain text or plain text encoded in GZIP will be logged. -
BODY_AND_HEADERS
Logs everything in HEADERS and BODY.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
shouldLogUrl
public boolean shouldLogUrl()Whether a URL should be logged.- Returns:
- Whether a URL should be logged.
-
shouldLogHeaders
public boolean shouldLogHeaders()Whether headers should be logged.- Returns:
- Whether headers should be logged.
-
shouldLogBody
public boolean shouldLogBody()Whether a body should be logged.- Returns:
- Whether a body should be logged.
-