public enum LogLevel extends Enum<LogLevel>
Enum Constant and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isPrettyJson() |
static LogLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LogLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
LogLevel |
withPrettyJson(boolean prettyJson)
Specifies whether to log prettified JSON.
|
public static final LogLevel NONE
public static final LogLevel BASIC
public static final LogLevel HEADERS
public static final LogLevel BODY
public static final LogLevel BODY_AND_HEADERS
public static LogLevel[] values()
for (LogLevel c : LogLevel.values()) System.out.println(c);
public static LogLevel valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isPrettyJson()
public LogLevel withPrettyJson(boolean prettyJson)
prettyJson
- true if JSON paylods are prettified.Copyright © 2019. All rights reserved.