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 and Description |
|---|
JsonFormatter()
Creates a new JSON formatter.
|
JsonFormatter(Map<StructuredFormatter.Key,String> keyOverrides)
Creates a new JSON formatter.
|
JsonFormatter(String keyOverrides)
Creates a new JSON formatter.
|
| Modifier and Type | Method and Description |
|---|---|
protected StructuredFormatter.Generator |
createGenerator(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.
|
after, before, format, getDateTimeFormatter, getExceptionOutputType, getKey, getKeyOverrides, getMetaData, getRecordDelimiter, getZoneId, isCallerCalculationRequired, isDetailedExceptionOutputType, isFormattedExceptionOutputType, isPrintDetails, setDateFormat, setExceptionOutputType, setMetaData, setPrintDetails, setRecordDelimiter, setZoneIdformatformatMessage, getHead, getTailpublic JsonFormatter()
public JsonFormatter(String keyOverrides)
keyOverrides - a string representation of a map to override keysPropertyValues.stringToEnumMap(Class, String)public JsonFormatter(Map<StructuredFormatter.Key,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(Writer writer)
StructuredFormattercreateGenerator in class StructuredFormatterCopyright © 2018 JBoss by Red Hat. All rights reserved.