### YamlMime:JavaEnum uid: "com.azure.core.http.policy.HttpLogDetailLevel" fullName: "com.azure.core.http.policy.HttpLogDetailLevel" name: "HttpLogDetailLevel" nameWithType: "HttpLogDetailLevel" summary: "The `HttpLogDetailLevel` class is an enumeration of the levels of detail to log on HTTP messages." inheritances: - "" - "" inheritedClassMethods: - classRef: "java.lang.Enum" methodsRef: - "valueOf" - "clone" - "compareTo" - "describeConstable" - "equals" - "finalize" - "getDeclaringClass" - "hashCode" - "name" - "ordinal" - "toString" - classRef: "java.lang.Object" methodsRef: - "getClass" - "notify" - "notifyAll" - "wait" - "wait" - "wait" syntax: "public enum **HttpLogDetailLevel**
extends Enum<>" fields: - uid: "com.azure.core.http.policy.HttpLogDetailLevel.BASIC" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.BASIC" name: "BASIC" nameWithType: "HttpLogDetailLevel.BASIC" summary: "Logs only URLs, HTTP methods, and time to finish the request." desc: "Logs only URLs, HTTP methods, and time to finish the request." - uid: "com.azure.core.http.policy.HttpLogDetailLevel.BODY" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.BODY" name: "BODY" nameWithType: "HttpLogDetailLevel.BODY" summary: "Logs everything in BASIC, plus all the request and response body." desc: "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. The response body will be buffered into memory even if it is never consumed by an application, possibly impacting performance." - uid: "com.azure.core.http.policy.HttpLogDetailLevel.BODY_AND_HEADERS" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.BODY_AND_HEADERS" name: "BODY_AND_HEADERS" nameWithType: "HttpLogDetailLevel.BODY_AND_HEADERS" summary: "Logs everything in HEADERS and BODY." desc: "Logs everything in HEADERS and BODY. Values of the headers will be logged only for allowed headers. See . The response body will be buffered into memory even if it is never consumed by an application, possibly impacting performance." - uid: "com.azure.core.http.policy.HttpLogDetailLevel.HEADERS" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.HEADERS" name: "HEADERS" nameWithType: "HttpLogDetailLevel.HEADERS" summary: "Logs everything in BASIC, plus all the request and response headers." desc: "Logs everything in BASIC, plus all the request and response headers. Values of the headers will be logged only for allowed headers. See ." - uid: "com.azure.core.http.policy.HttpLogDetailLevel.NONE" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.NONE" name: "NONE" nameWithType: "HttpLogDetailLevel.NONE" summary: "Logging is turned off." desc: "Logging is turned off." methods: - uid: "com.azure.core.http.policy.HttpLogDetailLevel.shouldLogBody()" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.shouldLogBody()" name: "shouldLogBody()" nameWithType: "HttpLogDetailLevel.shouldLogBody()" summary: "Whether a body should be logged." syntax: "public boolean shouldLogBody()" desc: "Whether a body should be logged." returns: description: "Whether a body should be logged." type: "" - uid: "com.azure.core.http.policy.HttpLogDetailLevel.shouldLogHeaders()" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.shouldLogHeaders()" name: "shouldLogHeaders()" nameWithType: "HttpLogDetailLevel.shouldLogHeaders()" summary: "Whether headers should be logged." syntax: "public boolean shouldLogHeaders()" desc: "Whether headers should be logged." returns: description: "Whether headers should be logged." type: "" - uid: "com.azure.core.http.policy.HttpLogDetailLevel.shouldLogUrl()" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.shouldLogUrl()" name: "shouldLogUrl()" nameWithType: "HttpLogDetailLevel.shouldLogUrl()" summary: "Whether a URL should be logged." syntax: "public boolean shouldLogUrl()" desc: "Whether a URL should be logged." returns: description: "Whether a URL should be logged." type: "" - uid: "com.azure.core.http.policy.HttpLogDetailLevel.valueOf(java.lang.String)" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.valueOf(String name)" name: "valueOf(String name)" nameWithType: "HttpLogDetailLevel.valueOf(String name)" modifiers: - "static" parameters: - name: "name" type: "String" syntax: "public static HttpLogDetailLevel valueOf(String name)" returns: type: "" - uid: "com.azure.core.http.policy.HttpLogDetailLevel.values()" fullName: "com.azure.core.http.policy.HttpLogDetailLevel.values()" name: "values()" nameWithType: "HttpLogDetailLevel.values()" modifiers: - "static" syntax: "public static HttpLogDetailLevel[] values()" returns: type: "[]" desc: "The `HttpLogDetailLevel` class is an enumeration of the levels of detail to log on HTTP messages.\n\nThis class is useful when you need to control the amount of information that is logged during the execution of HTTP requests. It provides several levels of detail, ranging from no logging at all to logging of headers and body content.\n\n**Code sample:**\n\nIn this example, an `HttpLogOptions` is created and the log level is set to `HttpLogDetailLevel.BODY_AND_HEADERS`. This means that the URL, HTTP method, headers, and body content of each request and response will be logged. The `HttpLogOptions` is then used to create an `HttpLoggingPolicy`, which can then be added to the pipeline.\n\n```java\nHttpLogOptions logOptions = new HttpLogOptions();\n logOptions.setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS);\n HttpLoggingPolicy loggingPolicy = new HttpLoggingPolicy(logOptions);\n```" metadata: {} package: "com.azure.core.http.policy" artifact: com.azure:azure-core:1.52.0