@API(value=MAINTAINED) public enum FDBTraceFormat extends Enum<FDBTraceFormat>
FDBDatabaseFactory.setTraceFormat(FDBTraceFormat)
method in order to
control the client's behavior.
This class is API.Status#MAINTAINED
. However, additional values to this enum may be added
if more trace format options become available.
Enum Constant and Description |
---|
DEFAULT
Use the system default.
|
JSON
Format the trace logs as JSON.
|
XML
Format the trace logs as XML.
|
Modifier and Type | Method and Description |
---|---|
String |
getOptionValue()
Get the value to supply to
setTraceFormat() . |
boolean |
isDefaultValue()
Get whether this is the default trace format.
|
static FDBTraceFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FDBTraceFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FDBTraceFormat DEFAULT
FDB_NETWORK_OPTION_TRACE_FORMAT
environment variable
is set or if one has already called NetworkOptions.setTraceFormat(String)
,
then the client trace logs will follow whatever format was already specified. If neither of
those are set, then the logs will used the default format, which is XML
.public static final FDBTraceFormat XML
Trace
tags, and each
log entry is a single-line TraceEvent
XML element. Each TraceEvent
will associate
log keys and values as attributes of the element (not as child elements). Logs will
be written to files with a .xml
extension.public static final FDBTraceFormat JSON
.json
extension.public static FDBTraceFormat[] values()
for (FDBTraceFormat c : FDBTraceFormat.values()) System.out.println(c);
public static FDBTraceFormat 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 null@Nonnull public String getOptionValue()
setTraceFormat()
.
The exception here is the default value which can be achieved by not supplying any value to that option.setTraceFormat()
public boolean isDefaultValue()
DEFAULT
for more details.