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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jboss.logmanager.formatters.StructuredFormatter
org.jboss.logmanager.formatters.StructuredFormatter.ExceptionOutputType, org.jboss.logmanager.formatters.StructuredFormatter.Generator, org.jboss.logmanager.formatters.StructuredFormatter.KeyNested classes/interfaces inherited from class org.jboss.logmanager.ExtFormatter
org.jboss.logmanager.ExtFormatter.Delegating -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionprotected voidafter(org.jboss.logmanager.formatters.StructuredFormatter.Generator generator, org.jboss.logmanager.ExtLogRecord record) protected org.jboss.logmanager.formatters.StructuredFormatter.GeneratorcreateGenerator(Writer writer) voidsetAdditionalFields(Map<String, AdditionalFieldConfig> additionalFields) voidsetExcludedKeys(Set<String> excludedKeys) Methods inherited from class org.jboss.logmanager.formatters.JsonFormatter
isPrettyPrint, setPrettyPrintMethods inherited from class org.jboss.logmanager.formatters.StructuredFormatter
before, format, getDateTimeFormatter, getExceptionOutputType, getKey, getKeyOverrides, getMetaData, getRecordDelimiter, getZoneId, isCallerCalculationRequired, isDetailedExceptionOutputType, isFormattedExceptionOutputType, isPrintDetails, setDateFormat, setExceptionOutputType, setMetaData, setPrintDetails, setRecordDelimiter, setZoneIdMethods inherited from class org.jboss.logmanager.ExtFormatter
format, formatMessage, formatMessageLegacy, formatMessageNone, formatMessagePrintf, wrap
-
Constructor Details
-
JsonFormatter
public JsonFormatter()Creates a new JSON formatter. -
JsonFormatter
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 Details
-
getExcludedKeys
-
setExcludedKeys
-
getAdditionalFields
-
setAdditionalFields
-
createGenerator
protected org.jboss.logmanager.formatters.StructuredFormatter.Generator createGenerator(Writer writer) - Overrides:
createGeneratorin classorg.jboss.logmanager.formatters.JsonFormatter
-
after
protected void after(org.jboss.logmanager.formatters.StructuredFormatter.Generator generator, org.jboss.logmanager.ExtLogRecord record) throws Exception - Overrides:
afterin classorg.jboss.logmanager.formatters.StructuredFormatter- Throws:
Exception
-