public class JsonFormatter extends StructuredFormatter
Note that including details can be expensive in terms of calculating the caller.
The details include;
StructuredFormatter.ExceptionOutputType, StructuredFormatter.Generator, StructuredFormatter.Key| Constructor | Description |
|---|---|
JsonFormatter() |
Creates a new JSON formatter.
|
JsonFormatter(java.lang.String keyOverrides) |
Creates a new JSON formatter.
|
JsonFormatter(java.util.Map<StructuredFormatter.Key,java.lang.String> keyOverrides) |
Creates a new JSON formatter.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected StructuredFormatter.Generator |
createGenerator(java.io.Writer writer) |
Creates the generator used to create the structured data.
|
boolean |
isPrettyPrint() |
Indicates whether or not pretty printing is enabled.
|
void |
setPrettyPrint(boolean prettyPrint) |
Turns on or off pretty printing.
|
formatclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafter, before, format, getDateTimeFormatter, getExceptionOutputType, getKey, getKeyOverrides, getMetaData, getRecordDelimiter, getZoneId, isCallerCalculationRequired, isDetailedExceptionOutputType, isFormattedExceptionOutputType, isPrintDetails, setDateFormat, setExceptionOutputType, setMetaData, setPrintDetails, setRecordDelimiter, setZoneIdpublic JsonFormatter()
public JsonFormatter(java.lang.String keyOverrides)
keyOverrides - a string representation of a map to override keysPropertyValues.stringToEnumMap(Class, String)public JsonFormatter(java.util.Map<StructuredFormatter.Key,java.lang.String> keyOverrides)
keyOverrides - a map of overrides for the default keyspublic boolean isPrettyPrint()
true if pretty printing is enabled, otherwise falsepublic void setPrettyPrint(boolean prettyPrint)
prettyPrint - true to turn on pretty printing or false to turn it offprotected StructuredFormatter.Generator createGenerator(java.io.Writer writer)
StructuredFormattercreateGenerator in class StructuredFormatterCopyright © 2018. All rights reserved.