Package io.quarkus.logging.json.runtime
Class JsonFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- org.jboss.logmanager.ExtFormatter
-
- org.jboss.logmanager.formatters.StructuredFormatter
-
- org.jboss.logmanager.formatters.JsonFormatter
-
- io.quarkus.logging.json.runtime.JsonFormatter
-
public class JsonFormatter extends org.jboss.logmanager.formatters.JsonFormatter
-
-
Constructor Summary
Constructors Constructor Description JsonFormatter()Creates a new JSON formatter.JsonFormatter(String keyOverrides)Creates a new JSON formatter.JsonFormatter(String keyOverrides, Set<String> excludedKeys, Map<String,AdditionalFieldConfig> additionalFields)Creates a new JSON formatter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafter(org.jboss.logmanager.formatters.StructuredFormatter.Generator generator, org.jboss.logmanager.ExtLogRecord record)protected org.jboss.logmanager.formatters.StructuredFormatter.GeneratorcreateGenerator(Writer writer)Map<String,AdditionalFieldConfig>getAdditionalFields()Set<String>getExcludedKeys()voidsetAdditionalFields(Map<String,AdditionalFieldConfig> additionalFields)voidsetExcludedKeys(Set<String> excludedKeys)-
Methods inherited from class org.jboss.logmanager.formatters.JsonFormatter
isPrettyPrint, setPrettyPrint
-
Methods inherited from class org.jboss.logmanager.formatters.StructuredFormatter
before, format, getDateTimeFormatter, getExceptionOutputType, getKey, getKeyOverrides, getRecordDelimiter, getZoneId, isCallerCalculationRequired, isDetailedExceptionOutputType, isFormattedExceptionOutputType, isPrintDetails, setDateFormat, setExceptionOutputType, setPrintDetails, setRecordDelimiter, setZoneId
-
-
-
-
Constructor Detail
-
JsonFormatter
public JsonFormatter()
Creates a new JSON formatter.
-
JsonFormatter
public JsonFormatter(String keyOverrides)
Creates a new JSON formatter.- Parameters:
keyOverrides- a string representation of a map to override keys "@see org.jboss.logmanager.ext.PropertyValues#stringToEnumMap(Class, String)"
-
JsonFormatter
public JsonFormatter(String keyOverrides, Set<String> excludedKeys, Map<String,AdditionalFieldConfig> additionalFields)
Creates a new JSON formatter.- Parameters:
keyOverrides- a string representation of a map to override keys "@see org.jboss.logmanager.ext.PropertyValues#stringToEnumMap(Class, String)"excludedKeys- a list of keys to be excluded when writing the outputadditionalFields- additionalFields to be added to the output
-
-
Method Detail
-
getAdditionalFields
public Map<String,AdditionalFieldConfig> getAdditionalFields()
-
setAdditionalFields
public void setAdditionalFields(Map<String,AdditionalFieldConfig> additionalFields)
-
createGenerator
protected org.jboss.logmanager.formatters.StructuredFormatter.Generator createGenerator(Writer writer)
- Overrides:
createGeneratorin classorg.jboss.logmanager.formatters.JsonFormatter
-
-