Package com.azure.core.http.policy
Enum HttpLogDetailLevel
- java.lang.Object
-
- java.lang.Enum<HttpLogDetailLevel>
-
- com.azure.core.http.policy.HttpLogDetailLevel
-
- All Implemented Interfaces:
Serializable
,Comparable<HttpLogDetailLevel>
public enum HttpLogDetailLevel extends Enum<HttpLogDetailLevel>
The level of detail to log on HTTP messages.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASIC
Logs only URLs, HTTP methods, and time to finish the request.BODY
Logs everything in BASIC, plus all the request and response body.BODY_AND_HEADERS
Logs everything in HEADERS and BODY.HEADERS
Logs everything in BASIC, plus all the request and response headers.NONE
Logging is turned off.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldLogBody()
boolean
shouldLogHeaders()
boolean
shouldLogUrl()
static HttpLogDetailLevel
valueOf(String name)
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 Detail
-
NONE
public static final HttpLogDetailLevel NONE
Logging is turned off.
-
BASIC
public static final HttpLogDetailLevel BASIC
Logs only URLs, HTTP methods, and time to finish the request.
-
HEADERS
public static final HttpLogDetailLevel HEADERS
Logs everything in BASIC, plus all the request and response headers.
-
BODY
public static final HttpLogDetailLevel 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
public static final HttpLogDetailLevel BODY_AND_HEADERS
Logs everything in HEADERS and BODY.
-
-
Method Detail
-
values
public static HttpLogDetailLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HttpLogDetailLevel c : HttpLogDetailLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HttpLogDetailLevel valueOf(String name)
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()
- Returns:
- a value indicating whether a request's URL should be logged.
-
shouldLogHeaders
public boolean shouldLogHeaders()
- Returns:
- a value indicating whether HTTP message headers should be logged.
-
shouldLogBody
public boolean shouldLogBody()
- Returns:
- a value indicating whether HTTP message bodies should be logged.
-
-